well if your white then there is no problem simply slide your rook all the way down to be on the same rank as the king and check mate but if your black then again it is a simple move simply move your rook straight down to where it is on the same rank as your black king this will stop the mate and also cover the marching pawn from being promoted to a queen
white's king is in check, if after moving the king, black moves the rook to the back rank, then white will move his rook up 1 square and threaten to bring it to the column on the very left for a mate
Salam
Chess Problem White to Play and Mate in 17