Since the balls are put back with replacement, the probability will not change.
P(G) - probability for green ball | P(B) - probability for blue ball
P(G) = x/(x + y) | P(B) = y/(x + y)
M wins the game if either he draws in the first turn, or he draws a blue and N also draws a blue and then he draws a green in his turn. Thus, we will get a series like this :
P(M) = P(G) + {1 - P(G)} * {1 - P(G)} * P(G) + ...
Also given, P(M) : {1 - P(M)} = 2 : 1
which gives P(M) = 2/3
Using the above values, we put in the series and we get the relation.