Letβs start by finding the equation for \(g(f(x))\text{.}\) Start by rewriting the outer function, \(g(x) \text{,}\) with parenthesis around the input \(x \text{.}\) This will help us see where the input of the function \(g \) is located in the equation.
\begin{equation*}
g(x)=3(x)+1
\end{equation*}
Now, the composition \(g(f(x))\) is telling us that we are putting the output of \(f(x)\text{,}\) which is \(2x^2+e^x\text{,}\) in place of the input of \(g(x)\text{,}\) which is just \(x \text{.}\) We can accomplish this by putting \(2x^2+e^x\) in place of the \(x \) in the equation for \(g(x)\text{.}\) So, the equation for the composition is given by
\begin{equation*}
g(f(x))=3(2x^2+e^x)+1
\end{equation*}
Similarly, to find the equation of \(f(g(x))\text{,}\) we start by rewriting the function \(f(x) \) with parenthesis around the input \(x \text{.}\)
\begin{equation*}
f(x)=2(x)^2+e^{(x)}
\end{equation*}
Then, by the same reasoning as above, we simply need to put the out of \(g(x)\text{,}\) which is \(3x+1\text{,}\) in place of the input of \(f(x)\text{,}\) which is again just \(x \text{.}\) So, the other composition is given by
\begin{equation*}
f(g(x))=2(3x+1)^2+e^{(3x+1)}
\end{equation*}