Molecular weight = 2 × Vapour Density = 28. "X has volume half that of oxygen" implies a mole ratio of X to O is 1:2. The formula is XO₂. The mass is X + 2(16) = 28, so X = -4, which is impossible. Assuming the question meant moles, and formula X₂O, then 2X + 16 = 28, 2X = 12, so X = 6.