When adding polynomial expressions, add the monomials with the same degree:
[tex]3g^2 + 3g^2[/tex]
[tex]-g - 8g[/tex]
[tex]4[/tex]
=
[tex]6g^2 -9g + 4[/tex]