Sometimes the chance to play a pawn discovery can pop up in the middle of a forced sequence. Black has little to work with here, but he can give a safe check with Qh5, so he considers White’s response and sees that it is tightly forced: Kg1. The other interesting thing about Qh5 is that if you examine the queen’s new lines you see that it is aimed at the rook—the loose rook—on d1, with only a Black pawn between them. Once White moves his king the pawn can step forward to f2 with check; White escapes with Kxf2, but then Black has QxR. You might also have seen this by starting with the loose rook on d1 and examining whether your queen somehow can attack the rook and White’s king at the same time. Qh5+ almost does it, at least aiming the queen at both pieces. You observe that your own pawn is in the way; you see that it can’t be removed in advance; and then you play with the move order and see that the pawn that seems to block the fork actually is the key to creating a discovered attack.