Tự cho đkxđ nha
<=> \(\left(\frac{x+1-x+1}{x+1}\right)\left(x+2\right)=\frac{x^2+2x+1+x^2-2x+1}{x^2-1}\)
<=> \(\frac{2\left(x+2\right)}{x+1}=\frac{2x^2+2}{x^2-1}\)
<=> \(\frac{2\left(x+2\right)\left(x-1\right)}{x^2-1}=\frac{2x^2+2}{x^2-1}\)
Suy ra: 2(x + 2)(x - 1) = 2x2 + 2
<=> 2(x2 + x - 2) = 2x2 + 2
<=> 2x2 + 2x - 4 - 2x2 - 2 = 0
<=> 2x - 6 = 0
<=> x = 3 (TM)
Vậy S = {3}