No. of ways to reach end of grid

I am not able to understand how he derived the formula. (m+n-2)!/(m-1)!(n-1)!. Please elaborate this.

You need to take (n - 1) down steps (let’s say D), and (m - 1) right steps (let’s say R).

Now the total number of ways = number of ways to arrange (n - 1) D’s and (m - 1) R’s, which is simply

((n - 1) + (m - 1))! / ((n-1)! * (m-1)!)