ĐKXĐ: \(x\ne\left\{-1;4\right\}\)
\(\Leftrightarrow\dfrac{2x\left(x-4\right)}{\left(x+1\right)\left(x-4\right)}=\dfrac{x^2-x+8}{\left(x+1\right)\left(x-4\right)}\)
\(\Leftrightarrow2x^2-8x=x^2-x+8\)
\(\Leftrightarrow x^2-7x-8=0\)
\(\Leftrightarrow\left(x+1\right)\left(x-8\right)=0\)
\(\Leftrightarrow\left[{}\begin{matrix}x=-1\\x=8\end{matrix}\right.\)