Start by converting grams of reactants into moles. Use the chemical equation, the numbers tell you moles Mg reacts with moles of acid to produce moles of hydrogen. Question for you: do you have more of one reactant than another? You can't get more hydrogen from one or the other, you only get as much hydrogen as you would get from both.