$$N_2 + 3H_2 \rightarrow 2NH_3$$
According to the stoichiometry of the equation, 1 mole of nitrogen reacts with 3 moles of hydrogen to produce 2 moles of ammonia. Therefore, if 3 moles of nitrogen are used in the reaction with excess hydrogen, the number of moles of ammonia produced can be calculated as follows:
Moles of ammonia = (3 moles of nitrogen) × (2 moles of ammonia / 1 mole of nitrogen) = 6 moles of ammonia
Therefore, 3 moles of nitrogen will produce 6 moles of ammonia gas when reacted with excess hydrogen.