Ta có: \(\left(x-1\right)\left(x^2+x+1\right)-x\left(x-2\right)\left(x+2\right)=5\)
\(\Leftrightarrow x^3-1-x\left(x^2-4\right)=5\)
\(\Leftrightarrow x^3-1-x^3+4x=5\)
\(\Leftrightarrow4x-1=5\)
\(\Leftrightarrow4x=6\)
hay \(x=\frac{3}{2}\)
Vậy: \(x=\frac{3}{2}\)