Solution (source code)

= Solution

Part (i) gives $\mathbb P(A)=2/3$. Since $\{X_1=0\}\subseteq A$ and has probability $1/2$,
$$
\boxed{\mathbb P(X_1=0\mid A)=\frac{1/2}{2/3}=\frac34}.
$$
Conditioned on $A$, a walk at one moves to zero with probability $3/4$ and to two with probability $1/4$. A walk at two must next move to one, since a move to three would violate $A$. If
$$
e_i=\mathbb E_i(T\mid A),
$$
first-step analysis gives
$$
e_1=1+\frac14e_2,
\qquad
e_2=1+e_1.
$$
Solving,
$$
\boxed{\mathbb E(T\mid A)=e_1=\frac53}.
$$