this is easy if you just think a bit
Only easy if you know that you can castle. But frankly, the chances of the king & rook not being moved that that late point in the game are pretty slim.