The problem is as following:
Person A and B are shooting at a target. Independently of who is shooting, the probability that the shot results in a hit is $p$, and each shot is independent from each other. They will shoot one by one, in the order $A,B,A,B,\dots$ until two hits are observed. Find the probability that it's the same person who got those hits.
My attempts:
One thing that I've noted is that the problem emphasizes independence, which is good if we would need to simplify things. My idea is like this:
$$P(A{\text{ hits twice| Two hits}}) + P(B{\text{ hits twice| Two hits}})$$
I've been trying several times, by arriving at the conclusion that it's $p^2(1-p)(2-p)$ by reasoning that the above leads to "A hit, B miss, A hit" or "A miss, B hit, A miss, B hit". My only concern is that the game could continue several rounds, i.e. "A miss, B miss, A miss, B miss, " so it feels like we should use the binomial/Poisson distribution somehow (or geometric, or an infinite sum, etc).
The answer should be as following:
$$\frac{{1 - p}}{{2 - p}}$$
Does anyone know how this problem can be tackled?