TXĐ: \(\left\{{}\begin{matrix}x\in R\\x\notin\left\{-3;1\right\}\end{matrix}\right.\)
Để giá trị 2 biểu thức bằng nhau thì \(\dfrac{x+2}{x+3}-\dfrac{x+1}{x-1}=\dfrac{4}{\left(x+3\right)\left(x-1\right)}\)
\(\Leftrightarrow\dfrac{\left(x+2\right)\left(x-1\right)}{\left(x+3\right)\left(x-1\right)}-\dfrac{\left(x+1\right)\left(x+3\right)}{\left(x-1\right)\left(x+3\right)}=\dfrac{4}{\left(x+3\right)\left(x-1\right)}\)
Suy ra: \(x^2-x+2x-2-\left(x^2+4x+3\right)=4\)
\(\Leftrightarrow x^2+x-2-x^2-4x-3-4=0\)
\(\Leftrightarrow3x-9=0\)
\(\Leftrightarrow3x=9\)
hay x=3(thỏa ĐK)
Vậy: S={3}