\(\left(x-2\right)\left(x^2+2x+4\right)+3x-4=\left(x+2\right)\left(x^2-2x+4\right)-x+1\)
\(\Rightarrow\left(x^3-8\right)+3x-4=\left(x^3+8\right)-x+1\)
\(\Rightarrow x^3-8+3x-4=x^3+8-x+1\)
\(\Rightarrow x^3-x^3+3x+x=8+8+4+1\)
\(\Rightarrow4x=21\)
\(\Rightarrow x=\dfrac{21}{5}\)