Your king is stuck on a8, in front of its own pawn, and you win only because his king is cut off on the f-file, too far from c7. The rule: send your rook to b8 to drive his rook off the b-file, walk your king out, and use your rook to shield it from the checks.