chess puzzle for 10-22 has second solution


No, Rg4 wouldn't work. With Rg4 White threatens an even exchange (rook for rook) so Black can ignore the rook and play h6 to give his king an escape square on h7.
Rg5 works because there the rook attacks not only a more valuable piece (the queen), but also the bishop on e5. If Black plays h6 he loses his queen and bishop. If Black moves his queen to maintain a back rank defence on f8 he loses his bishop. If Black takes the rook he gets mated on the back rank.