The number in each cell in the figure is the number of different paths to the cell. The number of different paths to the i-th row and the j-grid is the combination number C(I+J, j). The numbering of rows and columns starts from 0. In the figure, the number 126 is in the fifth row and the fourth column. Except for row 0 and column 0, each number is equal to the sum of the number above and the number on the left, which can be explained by the addition theorem: each grid can be from top to bottom or from left to right.
C(5+4,4)=C(9,4)= 126