Two rifleman shooting at a target where the game ends when two hits are observed.
Without loss of generality suppose that $A$ scores the first hit. What you're interested in is then then probability that $A$ also scores the next hit after that.
And then we can simplify the question to, "in a game where the first to score any hit wins, what is the chance $q$ of the second player winning?"
We can try to compute this by summing a series (which turns out to be geometric), but it is quicker to observe that if the first player misses then the situation is symmetric, just with the player swapped, and the probability of the now-first player to win must be $1-q$. So $q$ has to satisfy $$ q = p\cdot 0 + (1-p)\cdot (1-q) $$ which is easily solved.
The geometric solution to complement Henning's:
Following the first hit, add up the probabilities of an odd number of misses, and a hit:
$$P = \sum_{j=0}^{\infty} (1-p)^{2j+1}p = \frac{p(1-p)}{1-(1-p)^2} = \frac{1-p}{2-p}.$$
The number of initial misses is immaterial to the solution, but we do need to get one hit before we can get the second hit. The problem is a bit ill-defined without achieving that first hit, so it's expedient (and reasonable) to assume that one of the players got it.
But note that the probability of $n$ misses followed by a hit is
$$P'(n) = (1-p)^{n}p$$
and the sum over all $n$ is
$$P' = \sum_{j=0}^{\infty} p(1-p)^j = \frac{p}{1-(1-p)} = 1.$$
So if we hand-wave over the notion of "an infinite number of misses, followed by a hit" then we see that the result is exactly the same if we account for the initial misses. Each of the terms in $P$ (the top equation of my answer) is multiplied by the infinite number of terms shown in $P'$, but the terms of $P'$ add up to $1$.
Yet a different way of phrasing it is: Right after one hit, let $q$ denote the probability we are after, that the same person scores the second hit. Two cases will succeed:
- A miss followed by a hit (immediate succes)
- Two misses and we are back to the same situation with probability $q$ again
Thus $$ q = (1-p)p+(1-p)^2q $$ which can then be solved for $q$.