This puzzle includes an in-between move before the Black Queen is captured in 5 moves. The in-between move is necessary to mate sooner.
2. Qh4+ isn't necessary. You can play this and reach the same result one turn earlier.
2. Rc8c7 Qxc7 3. Qxc7+ Kf6 4. Rxf1
There's a flaw with your line. Black can follow 2. Rc8c7 with RxRc1+. Then 3. KxR Qxc7+ 4. Qxc7+ Ke8. This forces a pawn endgame.
This puzzle includes an in-between move before the Black Queen is captured in 5 moves. The in-between move is necessary to mate sooner.
2. Qh4+ isn't necessary. You can play this and reach the same result one turn earlier.
2. Rc8c7 Qxc7 3. Qxc7+ Kf6 4. Rxf1