There are 2 moles in equation, and two moles mass is 34 grams, but molar mass of ammonia is 17 g. Note that you wrote something like 340 g = 10 moles - which is wrong, 340 grams is 20 moles. You must carefully separate molar mass from mass of product/substrate.