Molar volume at STP can be used to convert from moles to gas volume and from gas volume to moles.
At STP: 1 mol = 22.4 L
So we are given the volume of H2 = 35.2 L
We can use that volume to find number of moles, then from number of moles we can find the mass of H2.
1 mol = 22.4 L
x mol = 35.2 L
22.4 L. x mol= 35.2 L x 1 mol
x = 35.2/22.4
x = 1.571 mol
H2 have 1.571 number of moles.
Since we want the mass of Mg, we will use the stoichiometry, for every 1 mole of Mg, 1 mole of H2 is produced. So the molar ration is 1:1. Therefore the number of moles of Mg = 1.571 mol
We can use this equation to find the mass:
n = m/M where n is the number of moles, m is the mass and M is the molar mass of Mg.
m = n x M
m = 1.571 x 24,305
m = 38.183 g