To find out how much of a reactant we need to form a product, look at the balanced equation. The coefficients will show us what the molar ratios are. Please comment if you have questions on how to balance an equation.
H2 + N2 → NH3
3 H2 + N2 → 2 NH3
This means that it takes 3 moles of H2 to react with 1 mole of N2 to produce 2 moles of NH3. In this question, we have 28 grams of N2. We need to convert that to moles in order to compare it to the number of moles of H2 needed to fully react with it. Using your periodic table, you should find that the molar mass of N2 is 28 grams/moles. That means we have 1 mole of N2, so it will require 3 moles of H2 to fully react. How much does 3 moles of H2 weigh in grams? The molar mass of H2 is 2 g/mol.
3 mol H2 ⋅ 2 grams/mol H2 = 6 grams H2
Notice how when we multiple mol by g/mol, the units cancel, leaving us with just grams.