you need to show 2 things:

for any two polynomials p(x),q(x) in Z[x]:

g(p(x) + q(x)) = g(p(x)) + g(q(x))

g(p(x)q(x)) = (g(p(x))(g(q(x))

here is something that may help:

if p(x) = a_{0}+ a_{1}x + .... + a_{n}x^{n},

then g(p(x)) = p(0) = a_{0}+ a_{1}*0 + .... + a_{n}*0 = a_{0}+ 0 + .... + 0 = a_{0}.

in other words p(0) returns the constant term of p(x).

a concrete example:

let p(x) = x - 2, and let q(x) = x + 4

then p(x) + q(x) = 2x + 2, and p(x)q(x) = x^{2}+ 2x - 8

g(p(x)) = -2

g(q(x)) = 4

g(p(x) + q(x)) = 2

g(p(x)q(x)) = -8.

is it not true that -2 + 4 = 2, and (-2)(4) = -8?