For the second before last f(f), you have to replace x with the function f(x).
For the last one you have to replace x with the function g(x)
[tex]g(x)=2x^2+1[/tex][tex]\begin{gathered} f(g)=3(2x^2+1)+5 \\ f(g)=(3\cdot2x^2)+(3\cdot1)+5 \\ f(g)=6x^2+3+1 \\ f(g)=6x^2+4 \end{gathered}[/tex]