\(\dfrac{x+1}{x-2}-\dfrac{5}{x+2}=\dfrac{12}{x^2-4}+1\)
\(\Leftrightarrow\left(x+1\right)\left(x+2\right)-5\left(x-2\right)=12+\left(x+2\right)\left(x-2\right)\)\(\Leftrightarrow x^2+2x+x+2-5x+10=12+x^2-4\)\(\Leftrightarrow x^2+2x+x-5x-x^2=12-4-2-10\)\(\Leftrightarrow-2x=-4\)
\(\Leftrightarrow x=2\)
Vậy \(S=\left\{2\right\}\)