A case where the critical pattern takes yet a little longer to come into view. Black’s king and queen are adjacent but can’t now be pinned effectively: they are on a diagonal, so the only White piece usable to impose a pin would be the queen; and the queen has nothing it can do here. You generally don’t pin one queen with another by attacking it, because then your opponent just plays QxQ. To create a pin of one queen by another you usually need to check the enemy king with your queen and force the enemy queen to interpose.
All right, so play with some checks. White has two to consider: QxR, which just loses the queen, and Rxc5, which at least is safe; so consider what follows from it. Black moves his king to b8. Now what? Look for your next check. White’s queen can attack the king in a new way by moving to e5. (Of course when you imagine this sequence you have to remember that White’s first rook move leaves e5 vacant.) Now Black is forced to interpose his queen on d6, and you see the emergence of the pattern we have been considering lately: Black has put his king and queen on the same diagonal, with his queen pinned by yours. What do you do? By now you know: consider throwing a rook at it—and remember that you have more than one. Thus the right move is Rf1-d1. Test it by asking what this would make possible if Black were to play QxQ. White’s response would be RxR#; in other words, Black’s queen is cross-pinned to a mating square, and so is lost.