Answer:
The probability of A winning is
and the probability of B winning is
.
Step-by-step explanation:
The probability of winning is <em>p</em>.
The game stops when either A or B wins.
The sample space of A winning is as follows:
{S, FFS, FFFFS, FFFFFFS, ...}
The sample space of B winning is as follows:
{FS, FFFS, FFFFFS, FFFFFFFS, ...}
Compute the probability of <em>A</em> winning as follows:
P (A winning) = P (S) + P (FFS) + P (FFFFS) + ...

Compute the probability of <em>B</em> winning as follows:
P (B winning) = P (FS) + P (FFFS) + P (FFFFFS) + ...

Thus, the probability of A winning is
and the probability of B winning is
.