You just have to equate the two sum of infinite GPs
Probability that X wins = p + (1-p)(0.5)(p) + (1-p)(0.5)(1-p)(0.5)p ...
Probability that Y wins = (1-p)(0.5) + (1-p)(0.5)(1-p)(0.5)
Equate both you will easily get it
Sorry did a small mistake yes it would be as you said
I think this question has been solved earlier ... Wait will find it