Read the previous post for the Markov chain description. The suggested trick with the infinite product of matrices is correct, but it will be quite tedious to do. The usual way is rather to get recurrence equations.

Notice $\displaystyle p(0,N)=0$ and $\displaystyle p(N,N)=1$. These are "boundary conditions". Moreover, for $\displaystyle 1\leq i\leq N-1$, we have:

$\displaystyle p(i,N)= p\ p(i+1,N)+ q\ p(i-1,N)$.

You should:

a) justify why this is true,

b) justify why the boundary conditions and this equation define uniquely $\displaystyle p(i,N)$ for all $\displaystyle i$ (i.e. how you could deduce $\displaystyle p(i,N)$ from them)

c) check that the anwer you are given satifies both the boundary conditions and the previous induction equation. Since there's only one solution, this has to be it.

Or you can replace b) and c) by:

b') use the boundary conditions and the equation to compute $\displaystyle p(i,N)$ directly (without using the given answer).

But this is more delicate.