Answer
$$g'(x)=6x(x^2+1)^2(x^2+2)^5(3x^2+4)$$
Work Step by Step
$$g'(x)=((x^2+1)^3(x^2+2)^6)'=((x^2+1)^3)'(x^2+2)^6+(x^2+1)^3((x^2+2)^6)'=
3(x^2+1)^2(x^2+1)'(x^2+2)^6+(x^2+1)^36(x^2+2)^5(x^2+2)'=
3(x^2+1)^2\cdot2x(x^2+2)^6+6(x^2+1)^3(x^2+2)^5\cdot2x=
6x(x^2+1)^2(x^2+2)^5(x^2+2+2(x^2+1))=
6x(x^2+1)^2(x^2+2)^5(3x^2+4)$$