f(x) = 8x + 2
g(x) = x2 - 8
To take the composition of f and g (fog), replace the x in f(x) with g(x):
(fog)(x) = 8g(x) + 2 [f(x) = 8x + 2]
(fog)(x) = 8(x2 - 8) + 2 [since g(x) = x2-8]
(fog)(x) = 8x2 - 64 + 2
(fog)(x) = 8x2 - 62
For a primer on composition of functions, check out the following:
http://www.mathsisfun.com/sets/functions-composition.html