\(\left(x-1\right)\left(x+2\right)-x^2=5\)
\(\Leftrightarrow x^2+2x-x-2-x^2=5\)
\(\Leftrightarrow x-2=5\)
\(\Leftrightarrow x=7\)
\(\left(x-1\right)\left(x+2\right)-x^2=5\)
\(\Leftrightarrow\left(x-1\right)\left(x+2\right)-x^2-5=0\)
\(\Leftrightarrow\left(x^2-x^2\right)+\left(2x-x\right)-\left(2+5\right)\)
\(\Leftrightarrow x-7=0\)
\(\Leftrightarrow x=0+7\)
\(\Leftrightarrow x=7\)
\(\left(x-1\right)\left(x+2\right)-x^2=5\)
\(x^2+x-2-x^2=5\)
\(x-2-5=0\)
\(x-7=0\)
\(x=7\)
Vậy \(x=7\)