conditional probability about gambling 
A gambler is playing a game  which have a probability 0.6 to wins with \$1  and  probability 0.4 to lose with \$1 The gambler will stops to play it when he have won \$4 or lost all the money.
Let $p_x$ be the probability that the gambler end it with \$4 if the gambler start the game with \$x, where $x = 1,2,3$. Using the conditional probability given the result of the ﬁrst game, express $p_2$ in terms of $p_1$ and $p_3$.hence use the $p_x$  to write out the three equation three unknowns to calculate the probabilities.

I though it was suitable to use tree diagram to solve it but its not really helpful. And it seems to be a recursive probability. The question was found in a chapter of conditional but I have read some books which have some similar example but its about  Finite Markov Chains. However I haven't  learnt it and don't know how to do this.
 A: Let $X_n$ be the gambler's fortune at time $n$, then $\{X_n:n\in\mathbb N_0\}$ is a Markov chain on $\{0,1,2,3,4\}$ with transition matrix
$$P=\begin{pmatrix}
1&0&0&0&0\\
\frac25&0&\frac35&0&0\\
0&\frac25&0&\frac35&0\\
0&0&\frac25&0&\frac35\\
0&0&0&0&1
\end{pmatrix}.
$$
This is an absorbing Markov chain, since $P_{00}=P_{44}=1$. For each transient state $i$ and absorbing state $j$, let $$\tau_{ij} = \inf\{n>0:X_n=j\mid X_0=i\} $$
and set $q_{ij} = \mathbb P(\tau_{ij}<\infty)$. Then we have the system of linear equations
\begin{align}
q_{34} &= \frac35 + \frac25q_{24}\\
q_{24} &= \frac35q_{34} + \frac25q_{14}\\
q_{14} &= \frac35q_{24}
\end{align}
with solution
$$\left(q_{14}, q_{24}, q_{34}\right) = \left(\frac{27}{65}, \frac9{13},\frac{57}{65}\right). $$
Since the probability of absorption is one (for intuition, try computing $\lim_{n\to\infty} P^n$), it follows that $q_{i1}+q_{i4}=1$ for each $i$. Hence
$$\left(q_{11}, q_{21}, q_{31}\right) = \left(\frac{38}{65}, \frac4{13},\frac8{65}\right). $$
Let $\alpha_i$ be the expected time until absorption (that is, $\alpha_i = \mathbb E[\tau_{i1}\wedge\tau_{i4}]$), then we have
\begin{align}
\alpha_2 &= 1+\frac35\alpha_3\\
\alpha_3 &= 1+\frac25\alpha_2+\frac35\alpha_4\\
\alpha_4 &= 1+\frac25\alpha_3,
\end{align}
and hence
$$\left(\alpha_2,\alpha_3,\alpha_4\right) = \left(\frac{200}{83}, \frac{280}{83}, \frac{195}{83} \right). $$
