Ok so you have 2.27 moles of N2 react with excess H2 to form NH3.
N2 + H2 -> NH3
2.27 moles + excess -> x moles
If we look at the ratio between N2 and NH3 with see that the ratio is 1 : 1
(as the number infront N2 and NH3 is 1). Now find the R.M.M (Relative atomic mass) of NH3 i.e
N- 14
H- 1 * 3 -> 3
NH3 - 17
After this multiply the R.M.M by the molarity 17 * 2.27 = 38.59 grams
when you have 4.54 do the exact same thing. 17 * 4.54 = 77.18 grams
Hope this helps :).