I’m a newbie at chess and I was wondering why I am unable to capture the black rook threatening my king?
The black rook is not threatening your king with those positions. The black bishop at B7 is the piece that is threatening your king which places you in check. From what I can see the only legal moves you have is moving the king from H1 to G1 to move your king to safety or your queen to F3 to block the check but that will likely cause you to lose your queen.
The rook is not threatening your king, what happened is a "discovered check" was created when the rook moved out of the way. Rf2+ moved the black rook from G2, where it was blocking the bishop at B7, out of the way, allowing that bishop to threaten the white king. There are three ways to deal with being in check:
- Capture the checking piece.
- You have no pieces threatening the bishop at B7, so this isn't an option in this case, the rook is not the checking piece.
- Block the checking piece.
- The only piece you have that can move onto the diagonal and block the check is your queen, you would have to move it to F3 to block the check. This likely will mean losing your queen (opponent's best move here in response would be Bxf3+, taking your queen with the bishop and getting the check back in place)
- Move the king out of check.
- There's only one spot your king can move to, and based on the app, it looks like this is the move you made, Kg1. The opponent can either move the rook to threaten the king (and the king cannot take the rook because the rook's square is threatened by the bishop, that would move into check) so you are forced to move the king back to H1. If this move repeats 3 times the game ends in a draw, so black will likely keep your king pinned in G1 while working other pieces into a better position.