Answer
$\text{a) }
f(g(x))=-18x+35
\\\text{b) }
g(f(x))=-18x-39$
Work Step by Step
$\bf{\text{Solution Outline:}}$
With
\begin{array}{l}\require{cancel}
f(x)=
3x+8
\\g(x)=
-6x+9
,\end{array}
to find $
f(g(x))
,$ replace $x$ with $g(x)$ in $f.$ To find $g(f(x)),$ replace $x$ with $f(x)$ in $g.$
$\bf{\text{Solution Details:}}$
Replacing $x$ with $g(x)$ in $f$, then
\begin{array}{l}\require{cancel}
f(g(x))=f(-6x+9)
\\\\
f(g(x))=3(-6x+9)+8
\\\\
f(g(x))=-18x+27+8
\\\\
f(g(x))=-18x+35
.\end{array}
Replacing $x$ with $f(x)$ in $g$, then
\begin{array}{l}\require{cancel}
g(f(x))=g(3x+8)
\\\\
g(f(x))=-6(3x+8)+9
\\\\
g(f(x))=-18x-48+9
\\\\
g(f(x))=-18x-39
.\end{array}
Hence,
\begin{array}{l}\require{cancel}
\text{a) }
f(g(x))=-18x+35
\\\text{b) }
g(f(x))=-18x-39
.\end{array}