n2(g) + 3h2-> 2nh3(g) this is the balanced equation
note the mole ratio between n2, h2 and nh3. it is 1 : 3 : 2 this will be important.
moles n2 present = 28.0 g n2 x 1 mole n2/28 g = 1 mole n2 present
moles h2 present = 25.0 g h2 x 1 mole h2/2 g = 12.5 moles h2 present
based on mole ratio, n2 is limiting in this situation because there is more than enough h2 but not enough n2.
moles nh3 that can be produced = 1 mole n2 x 2 moles nh3/mole n2 = 2 moles nh3 can be produced
grams of nh3 that can be produced = 2 moles nh3 x 17 g/mole = 34 grams of nh3 can be produced
note: the key to this problem is recognizing that n2 is limiting, and therefore limits how much nh3 can be produced.