This is a type of question that tests your ability to find the limiting reagent, or the component that first runs out in the reaction and limits the continuation of the reaction.
To start, begin by figuring out how many times each component can run the reaction. It takes three moles of H2 to run the reaction “once”, so with five moles of H2, you can run it 1.66 times.
It takes one mole of N2 to run the reaction “once”, so with three moles of N2, you can run it three times. This means that H2 is the limiting reagent (1.66 < 3), and N2 will have excess.
After the reaction is run to completion (1.66 times), 1.33 moles of N2 will remain (1.33 left + 1.66 used = 3, beginning).