the balanced equation for the reaction between Mg and HCl is as follows;
Mg + 2HCl ---> MgCl₂ + H₂
stoichiometry of Mg to HCl is 1:2
number of moles of Mg reacted - 2.00 x 10⁻³ g / 24 g/mol = 0.0833 x 10⁻³ mol
according to molar ratio
number of HCl moles reacted - 0.0833 x 10⁻³ x 2 mol = 0.167 x 10⁻³ mol
number of HCl moles in 50.0 mL - 0.167 x 10⁻³ mol
therefore number of HCl moles in 1000 mL - 0.167 x 10⁻³ mol / 0.0500 L
molarity of HCl - 0.00334 M