=>x^2-x=2x+4
=>x^2-3x-4=0
=>(x-4)(x+1)=0
=>x=4 hoặc x=-1
\(\dfrac{x}{x+2}=\dfrac{2}{x-1}đkxđ\left\{{}\begin{matrix}x\ne-2\\x\ne1\end{matrix}\right.\\ \Leftrightarrow\dfrac{x\left(x-1\right)}{\left(x+2\right)\left(x-1\right)}=\dfrac{2\left(x+2\right)}{\left(x-1\right)\left(x+2\right)}\\ \Rightarrow x\left(x-1\right)=2\left(x+2\right)\\ \Leftrightarrow x^2-x=2x+4\\ \Leftrightarrow x^2-x-2x-4=0\\ \Leftrightarrow x^2-3x-4=0\\ \Leftrightarrow x^2+x-4x-4=0\\ \Leftrightarrow x\left(x+1\right)-4\left(x+1\right)=0\\ \Leftrightarrow\left(x+1\right)\left(x-4\right)=0\\ \Leftrightarrow\left[{}\begin{matrix}x+1=0\\x-4=0\end{matrix}\right.\\ \Leftrightarrow\left[{}\begin{matrix}x=-1\\x=4\end{matrix}\right.\)
Vậy pt đã cho có tập nghiệm \(S=\left\{-1;4\right\}\)