\(\Leftrightarrow x^2+6x+9=43\)
\(\Leftrightarrow\left(x+3\right)^2=43\)
\(\Leftrightarrow\left[{}\begin{matrix}x=\sqrt{43}-3\\x=-\sqrt{43}-3\end{matrix}\right.\)
`x^2+6x=34`
`<=>x^2+6x+9=43`
`<=>(x+3)^2=(\sqrt(43))^2`
`<=> [(x+3=\sqrt(43)),(x+3=-\sqrt(43)):}`
`<=> [(x=-3+\sqrt(43)),(x=-3-\sqrt(43)):}`
Vậy `S={-3 +- \sqrt(43)}`.