`(x+1)(x+3)=2x^2-2`
`<=>x^2+x+3x+3=2x^2-2`
`<=>x^2-4x-5=0`
`<=>x^2-5x+x-5=0`
`<=>x(x-5)+(x-5)=0`
`<=>(x-5)(x+1)=0`
`<=>` $\left[ \begin{array}{l}x=5\\x=-1\end{array} \right.$
Vậy `S={5,-1}`
Ta có: \(\left(x+1\right)\left(x+3\right)=2x^2-2\)
\(\Leftrightarrow\left(x+1\right)\left(x+3\right)-2x^2+2=0\)
\(\Leftrightarrow\left(x+1\right)\left(x+3\right)-2\left(x^2-1\right)=0\)
\(\Leftrightarrow\left(x+1\right)\left(x+3\right)-2\left(x+1\right)\left(x-1\right)=0\)
\(\Leftrightarrow\left(x+1\right)\left[x+3-2\left(x-1\right)\right]=0\)
\(\Leftrightarrow\left(x+1\right)\left(x+3-2x+2\right)=0\)
\(\Leftrightarrow\left(x+3\right)\left(5-x\right)=0\)
\(\Leftrightarrow\left[{}\begin{matrix}x+3=0\\5-x=0\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=-3\\x=5\end{matrix}\right.\)
Vậy: S={-3;5}