Coin toss game - Probability of winning Question:
Two players A and B, alternatively toss a fair coin (A tosses the coin first, then B, than A again, etc.). The sequence of heads and tails is recorded and if there is head followed by a tail (HT subsequence), the game ends and the person who tosses the tail wins. What is the probability that A wins the game?
Solution:
I was told the following solution. If $P(A),P(B)$ are the probabilities that A, B win, then we can write:
$$P(A) = P(A\mid H)P(H)+P(A\mid T)P(T)$$
where $P(H)=P(T)=1/2$ are the probabilites that A gets H, T in the first toss respectively. Then $$P(A\mid T)=P(B)=1-P(A)\tag{1}$$ and $$P(A\mid H)=1/2\cdot 0+1/2\cdot (1-P(A\mid H))\tag{2}$$
which gives $P(A)=4/9$.

I am trying to understand equation (1),(2). I understand that if A gets T then the game essentially starts over with B being the first player. But since we want to know the probability of A winning, then shouldn't we have $P(A\mid T)=1-P(B)$? As for (2) I have not been able to find a starting point. Would somebody be able to explain their derivation?
 A: If the first toss is $T$, then $B$ cannot win on the second toss;
their chance to win after this are the same as $A$'s chance to win
was at the start of the game.
That is, after this $T$ toss the game essentially starts over,
except that now $B$ has the first toss instead of $A$;
the roles are reversed, so $A$'s chance to win ($P(A \mid T)$)
is the same as $B$'s chance to win the original game ($P(B)$).
If the first toss is $H$, there is a $\frac12$ chance of tails, in which
case $A$ loses immediately (hence the $\frac12 \cdot 0$ term
in the formula for $P(A \mid H)$),
and a $\frac12$ chance of heads, in which case
$A$ is now in the position that $B$ was in after the first head,
so $A$'s chance to win after two heads is $1$ minus their chance to win
after one head, hence the $\frac12 \cdot (1 - P(A \mid H)$ term,
A: For (1), if A gets T then the game starts over with B going first. In other words, $P(A \mid T) = P(B)$ and $P(B \mid T) = P(A)$. As $P(A)+P(B)=1$, $P(B) = 1-P(A)$. Combining equations yields (1).
For (2), suppose A get H. Half of the time, B will then get T, and the game will end with B winning. This is the $\frac{1}{2}\cdot 0$ part of the formula. The other half of the time, B gets H, and they've effectively switched positions, similar to in (1). More formally,
\begin{equation*}
P(A\mid HH) = P(B\mid H) = 1-P(A \mid H).
\end{equation*}
This is the second part of (2).
A: For your first problem, note that $P(A) + P(B) = 1$, thus $P(A\mid T)=1-P(B)$ implies $P(A \mid T) = P(A)$. This is not true since the events first toss is T and A wins the game are not independent. To be more specific, $P(A \mid T)$ denotes given the first toss is T and B will toss next, the probability A wins. This is quite different from $P(A)$.
For the second problem, since the first toss is H, for A to win, B must toss H too in the second toss. The probability is $\frac{1}{2}$ here. So what is the probability A wins given that the first two tosses are both H? 
This probability is the same as the probability that B wins given the first toss is H, i.e., $1 - P(A \mid H)$. Thus,
$$
P(A \mid H) = \frac{1}{2} \cdot (1 - P(A \mid H))
$$
A: if A throws the coin and get the tail then its prob to win in first throw is 1/2                          
if A does not get a tail so B flips and say it gets a tail then we have 1/2*1/2
if now B does not get a tail then A flips back and say it gets a tail then we have 1/2*1/2*1/2
so proceeding in this way the probability for A to win is 1/2+(1/2*1/2*1/2)+(1/2*1/2*1/2*1/2*1/2)+......... =2/3
so probability for B to win is 1-(2/3)=1/3
