Kinza,
I think you typed the equation incorrectly...
It should be N2 (g) + 3 H2 (g)→ 2 NH3 (g)
Remembering how to interpret the balanced chemical equation, this equation is saying:
1 mole of nitrogen gas reacts with 3 moles oh hydrogen gas to produce 2 moles of ammonia gas.
We can set up ratios/relationships from a balanced equation between any reaction/product
In this case for every 2 moles of ammonia, 3 moles of hydrogen is needed.
Since the question asked how many moles of hydrogen is required to produce 12 moles of ammonia, the relationship/ratio to be used is 3 mol H2/ 2 mol NH3
Beginning with what is given 12 mol NH3 x [3 mol H2/ 2 mol NH3] gives the answer 18 mol H2
This question is actually really simple and the concept shared above is what would be used for more complex problems.