This is a limiting reagent problem. You know that because amounts for BOTH reactants are given.
Mg + 2HCl ==> MgCl2 + H2.
mols Mg = 3.91
mol HCl = 3.91
Convert mols Mg to mols MgCl2 using the coefficients in the balanced equation. That's 3.91 mols Mg x (1 mol MgCl2/1 mol Mg) = 3.91 mols MgCl2.
Do the same for HCl
mols HCl x (1 mol MgCl2/2 mols HCl) = 3.91/2 = about1.9
Obviously both answers can't be right; the correct answer in limiting reagent problems is ALWAYS the smaller value and the reagent producing that value is the limiting reagent.
Then g MgCl2 = mols x molar mass.