$$\sqrt[3]{(x-1)(x+2)^2} = (x-1)^\frac 1 3 (x+2)^\frac 2 3$$
Applying the product rule:
$$f'(x) = \frac 1 3 (x-1)^{-\frac{2}{3}}(x+2)^\frac 2 3 + \frac 2 3(x-1)^\frac 1 3 (x+2)^{-\frac 1 3}$$
Negative powers in the denominator and a common denominator:
$$= \frac{(x+2)^\frac 1 3 (x+2)^\frac 2 3 + 2(x-1)^\frac 1 3 (x-1)^\frac 2 3}{3 (x-1)^\frac 2 3 (x+2)^\frac 1 3} = \frac{x+2+2x-2}{3 (x-1)^\frac 2 3 (x+2)^\frac 1 3}$$
Further simplify:
$$= \frac{x}{\sqrt[3]{(x+2)(x-1)^2}}$$
Is this solution correct? If not, why and what's the correct solution?
The solution is correct, but I wanted to point this is a typical case where logarithmic differentiation makes the computation both simpler and safer: $$\frac{f'}f=\frac13\Bigl(\frac 1{x-1}+\frac 2{x+2}\Bigr)=\frac1{\not3} \,\frac{\not3x}{(x-1)(x+2)},$$ so $$f'=\frac{f'}f\,f=\frac x{(x-1)(x+2)}\,(x-1)^{\tfrac13}(x+2)^{\tfrac23}= \frac x{(x-1)^{\tfrac23}(x+2)^{\tfrac13}}=\frac x{\sqrt[3]{(x-1)^{2}(x+2)\strut}}.$$