Maybe this works...
20g of X occupy V m^3
So 8g of X by itself occupy 0.4V m^3 (V proportionate to n)
Then gas Y occupies V-0.4V = 0.6Vm^3
At stp, Volume (in m^3) =0.0224n (n is number of moles of X)
0.4V = 0.0224(8.0/4)
V=0.112m^3
0.6V = 0.672m^3
Again, Volume=0.0224XN (N is no. of moles of Y)
0.672 = 0.0224 (m/Mr) of Y
then solve =)