By remembering how the geometric distribution arises, we can solve this problem with almost no calculation.
The problem can be seen as a competition
A geometric random variable $W$ models the number of failures in a sequence of independent Bernoulli trials before the first success is observed. Its parameter $p$ is the chance of success in each trial.
The usual metaphor for a Bernoulli$(p)$ trial is the flip of a coin with probability $p.$ The problem, then, can be phrased in terms of a competition. It consists of a series of turns that is continued until a definite outcome is achieved:
You hold a coin with probability $p_1$ of heads and I hold a coin with probability $p_2$ of heads. On each turn we both flip our coins. If both outcomes are the same, we tie; if your coin is heads you win; if my coin is heads I win; and otherwise we continue the series. What are the chances (i) you win, (ii) I win, (iii) I tie, (iv) the series goes on forever?
The competition will have a definite outcome
Let's deal with that last possibility right away: at each turn the series will continue only when we each observe tails, which has a chance of $q=(1-p_1)(1-p_2).$ The chance of continuing through $n=1,2,\ldots$ turns without a definite outcome therefore is $q^n.$ Provided $q\lt 1,$ this converges to $0,$ demonstrating there is a vanishingly small chance that the series goes longer than $n$ turns. Unless both coins always come up tails ($p_1=p_2=0$), then, the chance of (iv) is zero.
The problem can be restated in terms of the competition's outcome
We have seen the game will eventually terminate. If, after it is over, the loser were to continue flipping until they, too, observed a heads, then the numbers of flips will both be realizations of geometric random variables $W_1$ and $W_2$ with parameters $p_1$ and $p_2.$ Evidently, you win when $W_1$ is less than $W_2,$ I win when $W_1$ exceeds $W_2,$ and otherwise we tie.
A simple equation determines the chance you win
Let's consider your chances of winning in a little more detail. You can win exactly when either (a) you toss a heads and I toss a tail on the current turn or (b) we both toss tails on the current turn, in which case the game effectively starts over at the beginning. The chance of (a) is $p_1(1-p_2)$ (because our tosses are independent) and the chance of (b) is $(1-p_1)(1-p_2).$ Therefore,
$$\Pr(W_1 \lt W_2) = \Pr(\text{You win}) = p_1(1-p_2) + (1-p_1)(1-p_2)\Pr(\text{You win}).$$
This simple (linear) equation for your winning chances is easily solved to give
$$\Pr(W_1 \lt W_2) = \Pr(\text{You win}) = \frac{p_1(1-p_2)}{1 - (1-p_1)(1-p_2)} = \frac{p_1 -p_1p_2}{p_1+p_2-p_1p_2}.$$
The rest is easy
Interchanging our roles merely swaps the subscripts, from which we read off
$$\Pr(W_1 \gt W_2) = \Pr(W_2 \lt W_1) = \frac{p_2 -p_1p_2}{p_1+p_2-p_1p_2}.$$
The chance of a tie plus the chance that somebody wins must equal $1,$ because the chance that this game goes on forever is zero. Thus
$$\Pr(W_1=W_2) = 1 - (\Pr(W_1 \lt W_2) + \Pr(W_1 \gt W_2)) = \frac{p_1p_2}{p_1+p_2-p_1p_2}.$$
Simulations indicate this answer is correct
As a check, I simulated this game ten million times where your coin, with $p_1 = 9/10,$ has a slight edge over mine with $p_2=10/11.$ Here are the frequencies of the results compared to the formula:
Lose Tie Win
Simulation 0.0827 0.826 0.0917
Theory 0.0826 0.826 0.0917
True, most of the time we tie (because both coins so strongly favor heads), but you do win noticeably more often than I do, despite the tiny difference in the coins.
Here is the R
code for the simulation. It takes a few seconds to run.
p1 <- 9/10 # Your chances of heads
p2 <- 10/11 # My chances of heads
n <- 1e7 # Number of iterations
set.seed(17)
W1 <- rgeom(n, p1)
W2 <- rgeom(n, p2)
Outcome <- ifelse(W1 > W2, "Win", ifelse(W1 < W2, "Lose", "Tie"))
print(rbind(Simulation = table(Outcome) / n,
Theory = c(Win=p1 - p1*p2, Tie=p1*p2, Lose=p2-p1*p2)/(p1 + p2 - p1*p2)),
digits=3)
```