As a total newbie, I've been solving some medium-level problems on chesstempo. This one caught my eye. We play as Black after White's first move.
[FEN "6k1/5p1p/5bp1/p7/P1r3PP/2n2N2/4NP2/1R4K1 w - - 0 1"]
1. Rb8+ Kg7 2. g5
What I can't understand is why White plays g5.
It is a quite poor attack on the bishop as Black then plays Ne2, capturing the White knight and checking the king. Therefore White loses the knight and does not get to capture the bishop. Instead, White could have at least exchanged the knights:
[FEN "1K/2PN/2N2n/PP3r1P/7p/1pb/pkp/6R w - - 0 1"]
1. Nf6 Rf6
I this reckon to be a fine attack on h4 pawn as the White knight (which is protecting it) should be moved not to be captured by the rook. Yet, from White's viewpoint, I believe having the knights exchanged and the pawn captured is better than having the knight captured and leaving Black with all the pieces.
What is the point of such a move? What am I not seeing? Why are the moves I made (Nf6, Rf6) not right?