Because Cl2 is the limiting reactant, the amount of HCl able to be produced depends entirely on the amount of Cl2 available, thus why we used the 3 moles of Cl2 for the calculation. Using the 4 moles of H2 to calculate the amount of HCl produced would not give the right answer, as not all of the 4 moles of H2 are able to react to produce HCl. Remember, 1 mole of H2 and 1 mole of Cl2 are needed to produce 2 moles of HCl, so after all 3 moles of Cl2 are used up, the remaining 1 mole of H2 will not be able to react with anything.
Because Cl2 is the limiting reactant, the amount of HCl able to be produced depends entirely on the amount of Cl2 available, thus why we used the 3 moles of Cl2 for the calculation. Using the 4 moles of H2 to calculate the amount of HCl produced would not give the right answer, as not all of the 4 moles of H2 are able to react to produce HCl. Remember, 1 mole of H2 and 1 mole of Cl2 are needed to produce 2 moles of HCl, so after all 3 moles of Cl2 are used up, the remaining 1 mole of H2 will not be able to react with anything.