Answer
$\text{a) }
f(g(2))=21
\\\\\text{b) }
g(f(2))=69$
Work Step by Step
$\bf{\text{Solution Outline:}}$
With
\begin{array}{l}\require{cancel}
f(x)=
x+2
\\g(x)=
4x^2+x+1
,\end{array}
to find $
f(g(2))
,$ find first $
g(2)
.$ Then substitute the result in $f.$
To find $
g(f(2))
,$ find first $
f(2)
.$ Then substitute the result in $g.$
$\bf{\text{Solution Details:}}$
a) Replacing $x$ with $
2
$ in $g$ results to
\begin{array}{l}\require{cancel}
g(x)=4x^2+x+1
\\\\
g(2)=4(2)^2+2+1
\\\\
g(2)=4(4)+3
\\\\
g(2)=16+3
\\\\
g(2)=19
.\end{array}
Replacing $x$ with the result above in $f$ results to
\begin{array}{l}\require{cancel}
f(x)=x+2
\\\\
f(19)=19+2
\\\\
f(19)=21
.\end{array}
Hence, $
f(g(2))=21
.$
b) Replacing $x$ with $
2
$ in $f$ results to
\begin{array}{l}\require{cancel}
f(x)=x+2
\\\\
f(2)=2+2
\\\\
f(2)=4
.\end{array}
Replacing $x$ with the result above in $g$ results to
\begin{array}{l}\require{cancel}
g(x)=4x^2+x+1
\\\\
g(4)=4(4)^2+4+1
\\\\
g(4)=4(16)+5
\\\\
g(4)=64+5
\\\\
g(4)=69
.\end{array}
Hence, $
g(f(2))=69
.$
Therefore,
\begin{array}{l}\require{cancel}
\text{a) }
f(g(2))=21
\\\\\text{b) }
g(f(2))=69
.\end{array}