this is a combinatorix problem, so the easiest way is to classify the choice the person can make at each intersection. In this example, he can go left twice and down three times, and has to make a total of five decisions. Since there is no difference between lefts (conceptually, one left is the same as another), you want to keep the lefts and the downs in the same group. then, to build the equation, you write out the number of decisions (factorial) for the numerator and the groups (factorial) for the denominator, as follows:
1 2 3 4 5
------------
L L D D D
The equation will then look like this:
5!
-----
2! 3!
or
4*5
----
2
=
10
This is because there are two groups on the bottom of 2 possibilities and 3 possibilities, respectively. So you just divide the total number of choices by the number of constraints.