a) Ta có: \(\left|x^2-x+2\right|-3x-7=0\)
\(\Leftrightarrow\left|x^2-x+2\right|=3x+7\)
\(\Leftrightarrow x^2-x+2=3x+7\)(Vì \(x^2-x+2>0\forall x\))
\(\Leftrightarrow x^2-x+2-3x-7=0\)
\(\Leftrightarrow x^2-4x-5=0\)
\(\Leftrightarrow x^2-5x+x-5=0\)
\(\Leftrightarrow x\left(x-5\right)+\left(x-5\right)=0\)
\(\Leftrightarrow\left(x-5\right)\left(x+1\right)=0\)
\(\Leftrightarrow\left[{}\begin{matrix}x-5=0\\x+1=0\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=5\\x=-1\end{matrix}\right.\)
Vậy: S={5;-1}