Here's my explanation
#Delta G # of reaction can be calculated in the same way as #Delta H# that is
#DeltaG "of reaction"# = #Delta G# of formation of reactants - #Delta G# of formation ofproducts
In short we call #Delta H# of formation #Delta H_f^@#
Same is the case for #DeltaG# we call #DeltaG# of formation
#DeltaG_f^@#
Always remember #H_f^@# or #G_f^@# of elements like oxygen, carbon, hydrogen,lithium, sodium and all other element is 0
So if we know the #Delta G_f^@# of the reactants and products of a equation we can find out the #DeltaG# f the reaction
#4NH_3(g) + 5O_2(g) →4NO(g) +6H _2O(g)#
In this reaction we know that what is the #DeltaG# of the reaction but not the #G_f^@# of #H_2O #. Recall that elements have a value of 0 of #G_f^@#. Thus oxygen has 0 as its #DeltaG_f^@#. So the only unknown #DeltaG_f^@# is of #H_2O#. So this can be an algebraic equation. Set up the equation and take the #DeltaG_f^@# as #x#
#"-957.9 kJ" = (4 xx "86.71kJ/mol" + 6x )- (4 xx -16.66 + 0)#
#"-957.9 kJ" = 346.84 + 6x - (-66.64) + 0#
#-957.9 kJ = 346.84 + 6x + 66.64#
#-957.9kJ = 413.48 + 6x#
#6x = -957.9kJ - 413.48#
#6x = -1371.38#
#x = 1371.38/6 = -228.56333kJ#
This is the #DeltaG_f^@# of water