18. Let   f(x) = 3x + 4,   g(x) = x2 - 3.

(f + g)(x) = (3 x + 4) + (x2 - 3) = x2 + 3x + 1

(f - g)(x) = (3 x + 4) - (x2 - 3) = 3 x + 4 - x2 + 3 = -x2 + 3x + 7

(fg)(x) = (3 x + 4)(x2 - 3) = 3x3 - 9x + 4x2 -12   if one FOILs or   3x3 + 4x2 - 9x - 12   if one arranges the terms in order of degree.

(fog)(x) = f(g(x)) = f(x2 - 3) = 3(x2 - 3) + 4 = 3x2 - 9 + 4 = 3x2 - 5

(gof)(x) = g(f(x)) = g(3x + 4) = (3x + 4)2 - 3 = 9x2 + 24x + 16 - 3 = 9x2 + 24x + 13

Note:   (fog)(x)   is different from   (gof)(x)