# First one to get flip a coin and get two heads in a row wins

Here is the question. A and B flip coins. A starts and continues flipping until they get HH (two heads in a row), at which point they win, or until they get a T and then it is player B's turn. If player B flips HH then they win. If they get a T, then coin goes back to player A and so on. What is the probability that A wins?

I know the answer and got it right by using a geometric series approach (listed as second solution), but I tried solving it another way and I do not know where the logic is breaking down. This is the first (wrong solution) I will present. Any thoughts on why my thinking is off with this first attempted solution would be appreciated.

For notation, let $$P(Head | A) = P_1$$, $$P(Head | B) = P_2$$, $$P(A)$$ = probability that A wins, and $$P(B)$$ = probability that B wins.

Solution 1 (the wrong one):

$$P(A) = P(A | H_1) * P(H_1) + P(A | T_1 )*P(T_1)$$

which is equal to $$P_1^2 + P(A|T_1)(1-P_1)$$. I then said that if A flips a tail first it is becomes B's turn, and their chance of winning from this point is the same as B's chances of winning at the start of the game (i.e. the chances of the person with the second turn). Therefore I have this equation:

$$P(A) = P_1^2 + (1 - P(A)) (1 - P_1) \\ \longrightarrow P(A) = (P_1^2 - P_1 + 1)/ P_1$$

However, this is is obviously wrong. Imagine if $$P_1=1/2$$, then the probability makes no sense. So I guess my trouble spot is the assumption that $$P(A|T_1)=P(B)=1-P(A)$$.

Correct solution: For A to win I need to have A win right away, or A not win and B not win followed by A winning in the 3rd round, etc...

Since $$P(HH|A) = P_1^2$$ and $$P(HH|B)=P_2^2$$, I have (by writing out an infinite series of probabilities and not shown):

$$P(A) = P_1^2 \frac{1}{1 - (1-P_1^2)(1-P_2^2)}$$

You seem to substitute $$P_1$$ for $$P(A|H_1)$$, which is wrong. It's actually $$P(A|H_1)\geq P_1$$ because $$A$$ doesn't win only when the second toss is Heads, it can still win when the second toss is tails; an example case is tails, tails, heads, heads.