I think there is a bit of a mix up over notation - specifically, the problem is using $y$ in two different contexts.
The definition of the chain rule that you need (and what you have correctly stated):
$$\frac{dy}{dx} = \frac{dy}{du} \frac{du}{dx}$$
Now, for a composite function $y(u(x)) = [u(x)]^3$ (here, $y$ is the 'cubing' function), in order to take the derivative of $y$ with respect to $x$ we first take the derivative of $y$ w.r.t. $u$, then since $u$ is a function of $x$ (and should be written as $u(x)$ at this point) we use the chain rule as follows:
$\frac{dy}{du} = 3u^{2}$, and $\frac{du}{dx} = u'(x)$ since we don't have the expression of the function $u(x)$ itself. So it looks like
$$\frac{d}{dx}([u(x)]^3) = 3[u(x)]^{2}u'(x).$$
This looks different because I have chosen to relabel the function $y^3$ as $u^{3}$ in order for the stated chain rule to 'look right.' Alternatively, we could state the chain rule as $\frac{dh}{dx} = \frac{dh}{dy}\frac{dy}{dx}$ where $h = h(y(x)) = [y(x)]^3$. Then $\frac{dh}{dy} = 3y^2$ and $\frac{dy}{dx}$ is just $y'$ again because we don't have a specific expression for that function. Here we would have $\frac{dh}{dx} = 3y^2y'$.