Reaction of hydrogen with chlorine to give hydrogen chloride:
H2 + Cl2 2HCl
Since two mole of hydrogen are reacting, then multiplying the reaction by 2 we get,
2H2 + 2Cl2 4HCl
2 moles of hydrogen reacts with 2 moles of chlorine (excess of chlorine will be left over) to give 4 mole of HCl.
So the number of moles of hydrogen chloride produced = 4