The knight has just checked the black king, so it must have just moved. This means black's queen was checking white just before. So black must have just made a move that put the queen in that corner square. Make it impossible for the queen to have moved there.
> So black must have just made a move that put the queen in that corner square.
True, but only because the position is such that none of black's other possible previous moves would have discovered check on white - well, without already having had white in check; black's bishop could have discovered check from the queen, but it would have had to itself had white in check to do so. (I'm just trying to keep people from jumping to unwarrantedly general conclusions based on this special case.)