Magnesium wire(Mg) on heating in air gains weight due to the formation of magnesium oxide (MgO ). It is shown by the following reaction.
2Mg(s)+O2(g) ⟶2MgO(s)
So according to the law of conservation of mass, Mass of reactant = Mass of product.
So, Mass of magnessium wire + Mass of oxygen gas = Mass of magnesium oxide
∴X + Mass of O2 =Y
The above equation indicates that the mass of X is less than that of Y. i.e. X<Y
Hence, option B is correct.