Question

15 grams of element X combine with three grams of hydrogen to produce 18 grams of a compound Y of element X and hydrogen, with nothing left over. Also, as gases all at the same temperature and pressu

re, 2 liters of element X combine with 3 liters of hydrogen (H2) to give 2 liters of compound Y. What is the chemical formula for compound Y, and what is the atomic weight of element X? (Take the atomic weight of hydrogen atoms as 1, and assume the validity of Avogadro's principle.)