Answer
Solution set:$ \; \{-7, -3,1\}.$
Work Step by Step
By definition of the absolute value $ \left|A\right|=\left\{\begin{array}{lll}
A, & if & A\geq 0\\
-A & if & A\lt 0
\end{array}\right.$
This equation transforms into two equations without absolute values, $\left\{\begin{array}{llll}
(i) & x^{2}+6x+1=8 & for & x^{2}+6x+1\geq 0\\
& & & \\
(ii) & x^{2}+6x+1=-8 & for & x^{2}+6x+1 \lt 0
\end{array}\right.$
$(i)$
$ x^{2}+6x+1=8$
$ x^{2}+6x-7=0$
$(x+7)(x-1)=0$
$ x=-7, \; x=1$
Test these solutions:
$\left[\begin{array}{lll}
|(-7)^{2}+6(-7)+1| & & |(1^{2}+6(1)+1| =\\
=|49-42+1| & & =|1+6+1|\\
=|8| & & =|8|\\
=8 & & =8
\end{array}\right]$
both are valid solutions.
$(ii)$
$ x^{2}+6x+1=-8$
$ x^{2}+6x+9=0$
$(x+3)^{2}=0$
$ x=-3, \; $
Test this solution:
$\left[\begin{array}{lll}
|(-3)^{2}+6(-3)+1| & & \\
=|9-18+1| & & \\
=|-8| & & \\
=8 & &
\end{array}\right]$
a valid solution.
Solution set:$ \; \{-7, -3,1\}.$