a) Ta có: \(\frac{3}{x^2+x-2}-\frac{1}{x-1}=\frac{-7}{x+2}\)
\(\Leftrightarrow\frac{3}{x^2+x-2}-\frac{1}{x-1}-\frac{-7}{x+2}=0\)
\(\Leftrightarrow\frac{3}{\left(x-1\right).\left(x+2\right)}-\left[\frac{\left(x+2\right)+\left(-7\right).\left(x+1\right)}{\left(x-1\right).\left(x+2\right)}\right]=0\)
\(\Leftrightarrow\frac{3}{\left(x-1\right).\left(x+2\right)}-\frac{x+2-7x+7}{\left(x-1\right).\left(x+2\right)}=0\)
\(\Leftrightarrow\frac{3-\left(-6x+9\right)}{\left(x-1\right).\left(x+2\right)}=0\)
\(\Rightarrow3+6x-9=0\)
\(\Leftrightarrow6x-6=0\)
\(\Leftrightarrow6x=6\)
\(\Leftrightarrow x=1\left(TM\right)\)
Vậy \(S=\left\{1\right\}\)
b)Ta có: \(\frac{x+2}{x-2}-\frac{2}{x^2-2x}=\frac{1}{x}\)
\(\Leftrightarrow\frac{x+2}{x-2}-\frac{2}{x^2-2x}-\frac{1}{x}=0\)
\(\Leftrightarrow\left[\frac{x.\left(x+2\right)-\left(x-2\right)}{x.\left(x-2\right)}\right]-\frac{2}{x^2-2x}=0\)
\(\Leftrightarrow\frac{x^2+2x-x+2}{x.\left(x-2\right)}-\frac{2}{x.\left(x-2\right)}=0\)
\(\Leftrightarrow\frac{x^2+x+2-2}{x.\left(x-2\right)}=0\)
\(\Rightarrow x^2+x=0\)
\(\Leftrightarrow x.\left(x+1\right)=0\)
\(\Leftrightarrow\left[{}\begin{matrix}x=0\\x+1=0\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=0\left(TM\right)\\x=-1\left(TM\right)\end{matrix}\right.\)
Vậy \(S=\left\{-1,0\right\}\)