\((x+2)(x^2-2x+4)=(x-1)^3+3(x+1)^2\\\Leftrightarrow x^3+2^3=x^3-3x^2+3x-1+3\cdot(x^2+2x+1)\\\Leftrightarrow x^3 +8=x^3-3x^2+3x-1+3x^2+6x+3\\\Leftrightarrow x^3-x^3 +3x^2-3x-3x^2-6x=-1+3-8\\\Leftrightarrow -9x=-6\\\Leftrightarrow x=\dfrac{2}{3}\)
Vậy \(x=\dfrac{2}{3}\)