Finding the expected time it takes to get HT on a biased coin where the probability of heads is $p=1/3$.
My attempt: For $x_i$, let $i$ be the state of the sequence, then using:
$$x_i = 1 + \sum_{j} p_{i,j} x_j$$
for $E(T_i)=x_i$, we get:
$$x_0 = 1 + \frac{2}{3}x_0 + \frac{1}{3}x_1$$ $$x_1 = 1 + \frac{2}{3}x_2 + \frac{1}{3}x_1$$
but $x_2=0$, so then:
$$x_1 = 1 + \frac{1}{3}x_1$$
$$x_1 = \frac{2}{3}$$ $$\therefore x_0 = 1 + \frac{2}{3}x_0 + \frac{1}{2}$$ $$\therefore x_0 = \frac{9}{2}$$
Another Way
By the geometric distribution, with $P(H) = \frac13,\;\;E[H] = 3$
From here, either we get to $[HT]$ with Pr = $\frac23$ or remain where we were
Thus # of steps to get from $H$ to $HT$,(Pr$=\frac23)$, again using the geometric distribution, $= \frac32$
So $E[HT] = 3 + \frac32 =\frac92$