Answer:
2.24 L of hydrogen gas, measured at STP, are produced.
Explanation:
Given, Moles of magnesium metal,
= 0.100 mol
Moles of hydrochloric acid,
= 0.500 mol
According to the reaction shown below:-

1 mole of Mg reacts with 2 moles of 
0.100 mol of Mg reacts with 2*0.100 mol of 
Moles of
must react = 0.200 mol
Available moles of
= 0.500 moles
Limiting reagent is the one which is present in small amount. Thus,
is limiting reagent.
The formation of the product is governed by the limiting reagent. So,
1 mole of
on reaction forms 1 mole of 
0.100 mole of
on reaction forms 0.100 mole of 
Mole of
= 0.100 mol
At STP,
Pressure = 1 atm
Temperature = 273.15 K
Volume = ?
Using ideal gas equation as:

where,
P is the pressure
V is the volume
n is the number of moles
T is the temperature
R is Gas constant having value = 0.0821 L.atm/K.mol
Applying the equation as:
1 atm × V L = 0.100 × 0.0821 L.atm/K.mol × 273.15 K
<u>⇒V = 2.24 L</u>
2.24 L of hydrogen gas, measured at STP, are produced.