Step-by-step answer:
If one is constrained to move to the right, or up, or diagonally upwards (i.e. remain in the first quadrant), then
there are three choices at A.
At the next position, whichever path one has taken, there are also three choices.
At the following position, there are no more choices.
Therefore, there are 3*3 = 9 different paths.