If the outcome is one of the following:
H, TTH, TTTTH, ..., then X wins.
As subsequent tosses are independent, so the probability that X wins is
p+++....= Similarly Y wins if the outcome is one of the following: TH, TTTH, TTTTTH, ...
Therefore, the probability that Y wins is
++ = Since, the probability of winning the game by both the players is equal then, we have
=⇒p=