I think the correct answers are X2Y and X3Y, X2Y5 and X3Y5, and X4Y2 and X3Y,
for the following reason:
If you look at the combining masses of X and Y in
each of the two compounds,
The first compound contains 0.25g of X combined with
0.75g of Y
so the ratio (by mass) of X to Y = 1 : 3
The second compound contains 0.33 g of X combined with
0.67 g of Y
so the ratio (by mass) of X to Y = 1 : 2
Now, you suppose to prepare each of these two
compounds, starting with the same fixed mass of element Y ( I will choose 12g
of Y for an easy calculation!)
The first compound will then contain 4g of X and 12g
of Y
The second compound will then contain 6g of X and
12g of Y
The ratio which combined
the masses of X and the fixed mass (12g) of Y
= 4 : 6
or 2 : 3
So, the ratio of MOLES of X which combined with the
fixed amount of Y in the two compounds is also = 2 : 3
The two compounds given with the plausible formula must therefore contain the same ratio.