\(x^2+3x+m-1=0\left(1\right)\)
Thay \(m=3\) vào \(\left(1\right)\)
\(\Rightarrow x^2+3x+3-1=0\)
\(\Rightarrow x^2+3x+2=0\)
\(\Rightarrow x^2+x+2x+2=0\)
\(\Rightarrow x\left(x+1\right)+2\left(x+1\right)=0\)
\(\Rightarrow\left(x+2\right)\left(x+1\right)=0\)
\(\Rightarrow\left[{}\begin{matrix}x+2=0\\x+1=0\end{matrix}\right.\)
\(\Rightarrow\left[{}\begin{matrix}x=-2\\x=-1\end{matrix}\right.\)
Vậy \(S=\left\{-2;-1\right\}\) khi \(m=3\)