This isn't Home-Work - I am exercising for a test.
Alice and Bob are playing a coin flipping game where they flip coins until one of them wins. Alice wins when we get a sequence of "h,h,h" and Bob wins if we get a sequence of "t, h, t".
At first I needed to find the probability of winning for each of them and I think I've done it correctly.
Now I need to find $E[X]$ when $X$ is the number of flips they flipped until one of them wins. Now, the answer is between 5 and 6 but I can't understand why. I think it might have something to do with the Geometric distribution.
Thanks in advance,
Yaron.

This is a Markov chain problem. There are four states that can recur, which I will label $HH, HT, TH, TT$ for the last two throws. I will use the same name for the expected number of throws from each state to the end. If you are in HH, half the time you flip heads and stop, the other half you throw tails and go to HT, so $HH=\frac 12(1+(1+HT))$ You can write three more equations like that and solve the system. Starting from scratch, you flip twice to get into one of these states, so $E[X]=2+\frac 14(HH+HT+TH+TT)$