14g of Y to form the compound XY₂
Explanation:
In the compound XY, you have 1 mole of X and 1 mole of Y. Thus, you can imagine the molar mass of X is 2g/mol and molar mass of Y is 7g/mol.
Now, in the compound XY₂, you have 1 mole of X but 2 moles of Y.
If you have 2g of X, in this case you will need:
2 moles Y * (7g / mol) =
14g of Y to form the compound XY₂