The concentration of the acid would not affect the amount of H2 gas produced.If there is excess hydrochloric acid, the reaction goes until all the magnesiumis used up and then stops. The reaction might be more vigorous if the acid is more concentrated, but when one or the other of the reactants is used up, the reaction will stop.If the acid were so dilute that the HCl is used up before all the magnesium, the
amount of hydrogen produced is less than if there were excess HCl. That's due to the fact that the HCl is now the limiting reactant and when it's all used up,the reaction stops, even if there is still unreacted magnesium.
About the question in the attachment,can please post the link for the past paper so i check it