Let $p$ and $q$ be positive real numbers with $p+q<1$. Teams $A$ and $B$ play a series of games. For each game, $A$ wins with probability $p, B$ wins with probability $q$, and they tie with probability $1-p-q$. The series ends when one team has won two more games than the other, that team being declared the winner of the series. What is the probability that $A$ wins the series?
We can break the series into rounds, where each round is a series of ties followed by one team winning a game. Thus, a round that $A$ wins has the form $A, t A, t t A, t t t A, \ldots$, where $t$ represents a tied game and $A$ a game $A$ wins. Thus, the probability $A$ wins a round is the geometric series

$$
p^{\prime}=p+p(1-p-q)+p(1-p-q)^{2}+\cdots=\frac{p}{p+q}
$$

Similarly, the probability that $B$ wins a round is $q /(p+q)$. Now, the series must last an even number of rounds, since one team must be ahead by 2 . If it lasts $2 n$ rounds, then for the first $2 n-2$ rounds, the teams must alternate winning. The probability that each team wins one rounds from an adjacent pair is $p^{\prime} q^{\prime}+q^{\prime} p^{\prime}=2 p^{\prime} q^{\prime}$. This must happen $n-1$ times, and then $A$ must win the last two rounds, with probability $\left(p^{\prime}\right)^{2}$. Thus, the probability $A$ wins the series is another geometric series

$$
\sum_{n=1}^{\infty}\left(2 p^{\prime} q^{\prime}\right)^{n-1}\left(p^{\prime}\right)^{2}=\frac{\left(p^{\prime}\right)^{2}}{1-2 p^{\prime} q^{\prime}}=\frac{p^{2}}{(p+q)^{2}-2 p q}=\frac{p^{2}}{p^{2}+q^{2}}
$$