Infinite "if" clause? Hi I have the following problem and I'm not sure how I can solve it since there are infinite ways that one of the players will win:
two players A and B are flipping coins, A starts.
you flip the coin again and again till you get T, and then you transfer the coin to the other player(B).
you keep playing like this till someone gets H and H again (in a row)[which will make the flipping player the winner].
$P_1$ is the probability to get H as A, and $P_2$ is the probability to get H as B.
Now I'm trying to find out what is the probability of winning for player A but I'm stuck on a loop since there are infinite ways that A can win (A can get T and then B T till infinite)
 A: With your comment, with simplified notation,
Let $P(A$ gets a head) $= a$ and $P(B$ gets a head) $= b$.
We can solve without summing to infinity. Let us just consider $A$ winning
$A$ can win in $2$ turns with $Pr = a^2\,\;$ or pass the turn to $B$ with $Pr = (1-a^2)$ and be back at square one if $B$ doesn't win $(Pr = 1-b^2)$
So if $p$ is the overall probability of A winning,
$p = a^2 + (1-a^2)(1-b^2)\cdot p,\;$ which yields
$p = \dfrac{a^2}{1-(1-a^2)(1-b^2)}$ 
PS
In the particular case that $a=b=1/2, p = 4/7$

ADDED another method
$P(A$ wins on his first chance$) = a^2$
$P(A$ loses on his first chance and $B$ wins) $= (1-a^2)b^2$
This ratio will keep on repeating, so odds in favor of $A = {a^2}:{(1-a^2)b^2}$
$P(A\;\; wins) = \dfrac{a^2}{a^2 + (1-a^2)b^2}= \dfrac{a^2}{a^2+b^2-a^2b^2}$
A: We first note that 
$$\mathbb{P}(A \textrm{ wins}) = \mathbb{P}(\cup_{n=1}^\infty A \textrm{ wins in $n$ turns}) = \sum_{n=1}^\infty \mathbb{P}(A \textrm{ wins in $n$ turns})$$
So we must determine $\mathbb{P}(A \textrm{ wins in $n$ turns})$ for all $n\ge1$.  
For $A$ to win in $n$ turns, $A$ and $B$ must loose their turn $n-1$ times and $A$ must win in turn $n$.
To loose your turn, you must either flip head and then tails or tails, which has probability $\frac{3}{4}$. Winning is flipping two heads, which has probability $\frac{1}{4}$. Thus we have
$$ \mathbb{P}(A \textrm{ wins in $n$ turns}) = \left( \frac{3}{4} \right)^{2(n-1)} \frac{1}{4} = \frac{4}{16} \left( \frac{9}{16} \right)^{n-1}.$$
Therefore we have
$$ \mathbb{P}(A \textrm{ wins})  = \sum_{n=1}^\infty \frac{4}{16} \left( \frac{9}{16} \right)^{n-1} = \frac{4}{16} \sum_{n=0}^\infty\left( \frac{9}{16} \right)^{n} = \frac{4}{16} \frac{1}{\frac{7}{16}} = \frac{4}{7}.$$ 
If $A$ and $B$ have different probability of flipping head, say $p_a$ and $p_b$, we have
$$\mathbb{P}(A \textrm{ wins in $n$ turns}) = \left( 1 - p_a^2 \right)^{n-1} \left( 1- p_b \right)^{n-1} p_a^2.$$
Since $A$ has to lose his turn $n-1$ times with probability $(1 - p_a) + p_a (1-p_a)=1-p_a^2$ by flipping tails or flipping head and then tails and likewise for $B$. This gives
$$\mathbb{P}(A \textrm{ wins})  = \sum_{n=1}^\infty p_a^2 \left( (1-p_a^2) (1-p_b^2) \right)^{n-1} = \frac{p_a^2}{1 - (1-p_a^2) (1-p_b^2)} = \frac{p_a^2}{ p_a^2 + p_b^2 -p_a^2 p_b^2}.$$
A: Another approach is (not involve infinite sum):
First, it is easy to prove that $\mathbb{P}(\textrm{infinite game})=0$, thus $\mathbb{P}(\textrm{A win})+\mathbb{P}(\textrm{B win})=1$.
Let $x=\mathbb{P}(\textrm{original player A win})$.
Consider player A:


*

*If A get a tail, or a head and a tail, then $\mathbb{P}(\textrm{B win})=x\iff \mathbb{P}(\textrm{A win})=1-x$. That occur $3\over4$ of the time.

*If A get two heads, A win. That occur $1\over4$ of the time.


Thus:
$$x=\frac34\times (1-x)+\frac14\times 1\iff x=\frac47$$
