If #color(blue)(f(x))=color(blue)(1/3x^3-2)#
and #color(red)(g(x))=color(red)(root(3)(3x+6))#
then
#color(white)("XXX")color(blue)(f(color(red)(g(x))))=color(blue)(1/3color(red)(g(x))^3-2)#
#color(white)("XXX")=color(blue)(1/3color(red)((root(3)(3x+6)))^3-2)#
#color(white)("XXX")=color(blue)(1/3 * color(green)((3x+6)) -2#
#color(white)("XXX")=color(green)(x+2) color(blue)(-2)#
#color(white)("XXX")=x#
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
and
#color(white)("XXX")color(red)(g(color(blue)(f(x)))=color(red)(root(3)(3color(blue)((1/3x^3-2))+6)#
#color(white)("XXX")=color(red)(root(3)(color(green)(x^3-6)+6)#
#color(white)("XXX")=color(red)(root(3)(color(green)(x^3))#
#color(white)("XXX")=x#