a) $f(x) = \sqrt[3]{x}\ $ and $g(x) = x^3$
find $f\circ g=?$ and $g\circ f=?$
I have $f\circ g = f(g(x)) = f(x^3) = \sqrt[3]{x^3} = x$
So basically, first we replace $g(x)$ with its value, then we replace $x$ with the value of $f(x)$ inside $g(x)$?
$g\circ f = g(f(x)) = g( \sqrt[3]{x} ) = \sqrt[3]{x^3} $ OR $ \sqrt[3]{x}^3 $ ?
b) $f(x) = \sin x$ and $g(x) = x^2$
$$(f\circ g) = f(g(x)) = f(x^2) = \sin (x^2)$$
$$(g\circ f) = g(f(x)) = g(\sin x) = (\sin x)^2 = \sin^2x$$
Am I doing it right? I'm kinda confused whether I have to replace x with the original value or not.
Yes, you are doing the function compositions correctly. In the first case, since you had doubt on how to write $g\circ f$:
$$g\circ f = g(f(x)) = g(\sqrt[3] x) = \left(\sqrt[3] x\right)^3 = x$$
So, indeed, in the first case, we have $(f\circ g)(x) = (g \circ f)(x) = x$: by definition then, $g(x) = f^{-1}(x)$: $f$ and $g$ are called "inverses" of one another.
Very often, though, as you see in your second pair of functions, $f\circ g \neq g\circ f$.