Let f(x) = 3x + 2, and let g(x) = f(f(x)) - f(f(f(x)). If the domain of g is 0 <= x <= 2, compute the range of g.
g(x) = f(f(x)) - f(f(f(x)))
= f(3x+2) - f(f(3x+2))
= 3(3x+2) + 2 - f(3(3x+2) + 2)
= 9x + 8 - f(9x + 8)
= 9x + 8 - (3(9x + 8) + 2)
= 9x + 8 - (27x + 26)
= -18x - 18
x is in [0, 2]
g(x) is in [-54, -18]