You answered your own question - king would be in check.
Why you can't eat attacker defended by pinned piece? (rules question)
The king cannot move into check, thus Kxf2 is not legal. Even if it was legal and the object of chess was to physically capture the king, it would still be black who would capture first in that position.
So how can the Rook defend the Queen in that particular case?
In your example here, the black Q is not constrained from moving, but the black R is.
The rule that deals with this situation is 3.1.3 :
"A piece is considered to attack a square even if this piece is constrained from moving to that square because it would then leave or place the king of its own colour under attack".
So the R attacks the square the Q sits on. The Q is therefore protected, and white K may not capture.
Hey, guys!
Check this out:
So here is the question: why the King can't eat the Queen while she is protected by Rook, which is pinned to its own King?
FIDE rules says:
3.9 The king is said to be 'in check' if it is attacked by one or more of the opponent's pieces,
even if such pieces are constrained from moving to that square because they would then
leave or place their own king in check. [← this part is about Queen, it's not relevant to this case. This part is about Rook, in my opinion →] No piece can be moved that will either expose the
king of the same colour to check or leave that king in check.
So how can the Rook defend the Queen in that particular case?