Composition of functions:
f(g(x)): Write the equation of f(x) and substitute the x in that equation by the equation of g(x):
[tex]f(g(x))=3(x+6)-7[/tex]Simplify:
[tex]\begin{gathered} f(g(x))=3x+18-7 \\ \\ f(g(x))=3x+11 \end{gathered}[/tex]g(f(x)): Write the equation of g(x) and substitute the x in that equation by the equation of f(x):
[tex]g(f(x))=(3x-7)+6[/tex]Simplify:
[tex]\begin{gathered} g(f(x))=3x-7+6 \\ \\ g(f(x))=3x-1 \end{gathered}[/tex]Then, the composition of the given functions is:[tex]\begin{gathered} f(g(x))=3x+11 \\ \\ g(f(x))=3x-1 \end{gathered}[/tex]