For f(g(x)), substitute x+1 into function f(x).
f(g(x)) = 5(x+1) - 8. Multiply 5 by x+1
f(g(x)) = 5x + 5 - 8. Combine like terms.
f(g(x)) = 5x - 3
For g(f(x)), substitute 5x-8 into function g(x).
g(f(x)) = (5x-8) + 1. Combine like terms.
g(f(x)) = 5x -7.