This quadratic does not factor in an obvious way (because, at it will turn out, its roots are not rational). This time we should use the quadratic formula to find the roots:
\begin{equation*}
\begin{aligned}
x=\frac{-b\pm\sqrt{b^2-4ac}}{2a} &= \frac{-(-6)\pm\sqrt{(-6)^2-4(1)(7)}}{2(1)} \\
&= \frac{6\pm\sqrt{36-28}}{2} \\
&= \frac{6\pm\sqrt{8}}{2} \\
&= \frac{6\pm2\sqrt{2}}{2} \\
&= 3\pm \sqrt{2}
\end{aligned}
\end{equation*}
so the roots are \(3+\sqrt{2}\) and \(3-\sqrt{2}\text{.}\)
You can check this answer by verifying that \(f\left(3+\sqrt{2}\right) = 0\) and \(f\left(3-\sqrt{2}\right) = 0\text{.}\)
These two roots correspond to factors of the original polynomial:
\begin{equation*}
x^2-6x+7 = \left(x-\left(3-\sqrt{2}\right)\right)\left(x-\left(3+\sqrt{2}\right)\right)
\end{equation*}
Multiplying out the factored form is another way to verify the answer.