I need help with this probability question I am working on a probability question, and I'm getting stuck at what to do next. Here's the question:
You and a friend are playing a game with a fair coin. You go first, and you each take turns flipping the coin, and record what the coin lands on. A player wins the game when they get two consecutive heads. What is the probability that you win?
Here's what I tried:
If you get H and the friend gets T, then the probability you get H is $\frac18$. Similarly, the friend could get H and you would win if you get H, so that's another $\frac18$. If you get T and your friend gets H, then if you get H, your friend must get T for you to win, and you could get H on your third flip, giving $\frac{1}{32}$. If you get T and your friend gets T, then you could get H, and so on. As you can see, the cases get out of control, and I don't know how to actually use these cases, since there's an infinite amount. Can someone help?

We consider the last $2$ results of tossing the coin: yours $a$ and your friend's $b$ (let heads be $1$ and tails $0$), suppose now is your turn again.
Then we consider $6$ states of the game: $A(0,0),\,B(0,1),\,C(1,0),\,D(1,1)$, $E$ -- the player that have just tossed the coin wins, $F$ -- the state the game continiues after winning/losing (for easy summation after).
Let $\mathbf{x}_n=(p(A),p(B),p(C),p(D),p(E),p(F))^T$ after tossing the coin $n$ times.
It's clear, that $\mathbf{x}_2=\left(\frac14,\frac14,\frac14,\frac14,0,0\right)$ and $\mathbf{x}_{n+1}=A\mathbf{x}_n$ where
$$A=\begin{pmatrix}
\frac12&0&\frac12&0&0&0\\
\frac12&0&0&0&0&0\\
0&\frac12&0&\frac12&0&0\\
0&\frac12&0&0&0&0\\
0&0&\frac12&\frac12&0&0\\
0&0&0&0&1&1
\end{pmatrix}$$
It's left only to compute $A=SJS^{-1}$ and perform summation $M=S\left(
\sum\limits_{n=0}^{\infty}J^{2n+1}
\right)S^{-1}$ so the answer will be $(0,0,0,0,1,0)M\mathbf{x}_2$ (as was done in these answers: 1, 2, 3). WA gives
$$S=\begin{pmatrix}
0 & -\frac{i}{2} & \frac{i}{2} & 0 & \frac{1}{4} (1 + \sqrt{5}) & \frac{1}{4} (1 - \sqrt{5})\\
0 & \frac{1}{2} & \frac{1}{2} & 0 & \frac{1}{4} (-3 - \sqrt{5}) & \frac{1}{4} (-3 + \sqrt{5})\\
0 & -\frac{1}{2} + \frac{i}{2} & -\frac{1}{2} - \frac{i}{2} & 0 & \frac{1}{4} (-3 - \sqrt{5}) & \frac{1}{4} (-3 + \sqrt{5})\\
0 & \frac{i}{2} & -\frac{i}{2} & 0 & \frac{1}{2} (2 + \sqrt{5}) & 1 - \frac{\sqrt{5}}{2}\\
-1 & -1 - \frac{i}{2} & -1 + \frac{i}{2} & 0 & \frac{1}{4} (-3 - \sqrt{5}) & \frac{1}{4} (-3 + \sqrt{5})\\
1 & 1 & 1 & 1 & 1 & 1\end{pmatrix}\\
J=\operatorname{diag}\left(
0,-\frac{i}{2},\frac{i}{2},1,\frac{1}{4} (1 - \sqrt{5}),\frac{1}{4} (1 + \sqrt{5})
\right)$$
And the answer is $\frac{14}{25}$ (computations here).
