Answer
(a) $x^2+6$
(b) $x^2+x-1$
Work Step by Step
(a) Given $g(x)=2x+1,h(x)=4x^2+4x+7,f\circ g=h$
$g^{-1}(x)=\frac{x-1}{2}$
$f(x)=h(x)\circ g^{-1}(x)=4(\frac{x-1}{2})^2+4\times\frac{x-1}{2}+7=x^2+6$
(b) Given $f(x)=3x+5,h(x)=3x^2+3x+2,f\circ g=h$
$f^{-1}(x)=\frac{x-5}{3}$
$g(x)=f^{-1}(x)\circ h(x)=\frac{3x^2+3x+2-5}{3}=x^2+x-1$