Find the indicated values. I am struggling to understand these two problems

[tex] \bf \begin{cases}
f(x)=e^x\\
g(x)=3x^2+2x+6
\end{cases}~\hspace{3em}
\begin{array}{|l|ll}
\cline{1-1}
f(~~g(x)~~)\\
\cline{1-1}
\\
e^{g(x)}\\\\
e^{3x^2+2x+6}
\\\\
\cline{1-1}
\end{array}~\hfill
\begin{array}{|l|ll}
\cline{1-1}
~\hfill g(~~f(x)~~)~\hfill \\
\cline{1-1}
\\
3[f(x)]^2+2[f(x)]+6\\\\
3(e^x)^2+2(e^x)+6\\\\
3e^{2x}2e^x+6
\\\\
\cline{1-1}
\end{array} [/tex]