We have a case of composite functions, we must evaluate or replace one function as x value of the other one. In other words and doing the calculations
[tex]\begin{gathered} f(g(x))=f(x^2+1)=\sqrt{x^2+1}+4 \\ g(f(x))=(\sqrt{x})^2+8\sqrt{x}+16+1=x+8\sqrt{x}+17 \end{gathered}[/tex]Thus, the answer to the exercise is
f(g(x))=√(x^2+1) +4
g(f(x))=x+8√x+17