This is problem 1 in The Ultimate Chess Puzzle Book: 1001 Original Chess Puzzles to Challenge All Standards of Player, from Beginner to Grandmaster, by John Emms. White to move.
White mates with Qf8 and the game is over.
But let’s have some fun with this position. First, from a positional standpoint we have queen endgame with only two pawns per side. Barring a blunder or miscalculation, the goal of both sides is to queen one of their pawns while also preventing their opponent from doing the same. There are two other points of note about this position. First, blacks king is more exposed since the rook’s pawn provides poor protection. Secondly, whites pass pawn is further from the kings.
What would happen if the queens were not on the board the board? With white to move, white wins. It’s a pawn race, but white queens with check and will capture black’s pawn.
What if black is to move? If it were strictly a pawn race, then black would queen first and then white would queen and we would have a queen endgame. However, after 1. …, c5, white will win after 2. Kg4 and after 1. …, Kg7 white wins with with 2. a4.
Suppose it were black to move. The following moves prevent mate: Kg8, Kg7, Qa3, Qb4, Qc5, Qg7, Qf6, Qf3, Qb3, Qc4, Qxg3+, h6, and h5. Some of these are ruled out immediately.
Qa3, Qb4, Qc5, Qf6, Qb3, and Qxg3+ lose the queen.
1. …, Qg7 2. Qd8+, Qg8 3. Qxg8+, Kxg8 4. a4 and white wins per above.
1. …, Qc4 2. Qf8+, Qg8 3. Qxg8+, Kxg8 4. a4 and white wins.
h6 and h5 both lose the h-pawn and further expose black’s king.
1. …, Qf3 looks suspicious due to 2. Qd4+, Kg8 3. Qg4+, Qxg4 4. Kxg4, Kf7 5. Kf5 and white has a superior king position and his passed pawn is further away.
The choice is between Kg7 and Kg8, which Fritz rates about the same.
QED