COMC 2022 B Problem 2

A stone general is a chess piece that moves one square diagonally upward on each move; that is, it may move from the coordinate (a, b) to either of the coordinates (a-1, b+1) or (a+1, b+1). How many ways are there for a stone general to move from (5,1) to (4,8) in seven moves on a standard 8 by 8 chessboard?