In the reaction:
$$\ce{N_2 + 3H_2 \to 2NH_3}$$
If 15 moles of $\ce{N_2}$ is used along with 30 moles of $\ce{H_2}$, then $\ce{H_2}$ will be the limiting reagent (Reactant which is consumed completely). This is because 15 moles of $\ce{N_2}$ will need 45 moles of $\ce{H_2}$ ($15 \times 3$, by the balanced reaction) for reacting completely, but as there is only 30 moles available hence it will react in a fixed proportion, hence you will have to assume the reacting moles of $\ce{N_2}$ as $x$. By this the equation goes,
$$\frac{\ce{N_2}}{\ce{H_2}}=\frac{1}{3}=\frac{x}{30}$$ From this $$x=\frac{30}{3}=10$$
Hence from 15 moles of $\ce{N_2}$ only 10 moles will react, hence no of molesthe amount of $\ce{NH_3}$ formed will be 20 moles ($10 \times 2$, by the balanced reaction).