why for the last move, Ka4 is accepted but Kb4 fails?
en.lichess.org/training/44648Do you mean Rb4? I don't know if black can draw it but Ra4 doesn't give any chance for black to bring his rook on 8th rank on time. It's just winning on spot.
no I meant after Rxe4 Rh2+ Kb3 f5 Re7 Rh3+
why does Kb4 fail?
Kb4 is even better than Ka4.
I've played Rxe4 Rh2 Kb3 f5 Ra4 and the puzzle has finished after it.