Start by balancing the equation for the reaction between hydrogen #"H"_2# and nitrogen #"N"_2#, which produces ammonia #"NH"_3#:
#color(darkgreen)(1) color(white)(.) "N"_2 (g) + color(darkgreen)(3) color(white)(.) "H"_2 to color(darkgreen)(2) color(white)(.) "NH"_3 (g)#
From the coefficients #(n("N"_2))/(n("H"_2))=(color(darkgreen)(1))/(color(darkgreen)(3))#
meaning that all of the nitrogen and hydrogen molecules available would have been converted to ammonia if supplied at a #1:3# ratio; otherwise one of the reagents will be in excess.
The question states that, however,
#(n'("N"_2))/( n' ("H"_2))=3.5/5.0=7/10#;
#7/10 color(purple)(>) 1/3#
meaning that the species represented in the numerator- nitrogen #"N"_2#- is in excess; The number of moles hence the mass of ammonia produced shall be calculated from the quantity of the limiting reactant- #"H"_2#- available. Also, from coefficients in the balanced equation:
#(n("NH"_3))/(n("H"_2))=(color(darkgreen)(2))/(color(darkgreen)(3))#
#n("NH"_3)=(color(darkgreen)(2))/(color(darkgreen)(3))*n("H"_2)#
#color(white)(n("NH"_3))=(color(darkgreen)(2))/(color(darkgreen)(3))*3.50 color(white)(l) "mol"#
#color(white)(n("NH"_3))=2.33 color(white)(l) "mol"#
Take #17.031 color(white)(l) g*"mol"^(-1)# as the molar mass #M# of ammonia #"NH"_3#,
#m("NH"_3)=n("NH"_3)*M("NH"_3)#
#color(white)(m("NH"_3))=2.33 color(white)(l) color(red)(cancel(color(black)("mol"))) * 17.031 color(white)(l) g*color(red)(cancel(color(black)("mol"^(-1))))#
#color(white)(m("NH"_3))=39.7 color(white)(l) "g"#