Solution (source code)

= Solution

Write $u_n=\mathbb P(X_n=0\mid X_0=0)$. The <Markov property>, conditioning on the state at time $n$, gives
$$
u_{n+1}=\alpha u_n+(1-\beta)(1-u_n)=(\alpha+\beta-1)u_n+1-\beta,\qquad u_0=1.
$$
Put $r=\alpha+\beta-1$ and $\pi_0=(1-\beta)/(2-\alpha-\beta)$. Then $\pi_0=r\pi_0+1-\beta$, so subtraction yields $u_{n+1}-\pi_0=r(u_n-\pi_0)$. Iterating this <linear recurrence> gives
$$
\boxed{u_n=\frac{1-\beta+(1-\alpha)(\alpha+\beta-1)^n}{2-\alpha-\beta},\qquad n\geq0.}
$$
For $r=0$, read the $n=0$ expression using $r^0=1$, or state $u_0=1$ separately; for $n\geq1$, $u_n=\pi_0$. Since $|r|<1$, the result also shows <convergence in a metric space> to the <stationary distribution> probability $\pi_0$.