Cant figure out the reason for a draw

If you get the same position three times in a game, chess.com will automatically declare it a draw by repetition. You kept moving your pieces around the same spot on the board while trying to remember the King and Rook checkmate pattern. You ended up getting the position with the kings on b5 and d5 and the rook on c4 three times. This caused the draw. Obviously you want to avoid making the same moves over and over, but it is also important to avoid moving your pieces in same general area when there are very few pieces on the board.

Click on moves 70, 72 and 76. The positions are the same with the same player to move. That is 3 fold repetition, AKA a draw. You can also see a little circled arrows just next to those moves, so that should help you in figuring it out.