If you have a polynomial f(x) of degree n and you can find all its solution x_1,..,x_n, then you have that
f(x)=(x-x_1)* ... *(x-x_n)
In your case, n=2, so if we find two solutions x_1 and x_2, we can write
x^2-8x+6=(x-x_1)(x-x_2)
To find the solution, we can use the standard formula
x_{1,2} = \frac{-b\pm\sqrt(b^2-4ac)}{2a}
In your case, a=1, b=-8 and c=6. So, the formula becomes
x_{1,2} = \frac{8\pm\sqrt(64-4*1*6)}{2}
= \frac{8\pm\sqrt(64-24)}{2}
=\frac{8\pm\sqrt(40)}{2}
Since sqrt(40)=sqrt(4*10)=sqrt(4)*sqrt(10)=2sqrt(10), the formula becomes
\frac{8\pm2\sqrt(10)}{2} = 4\pmsqrt(10)
So, the solutions are x_1 = 4+sqrt(10) and x_2 = 4-sqrt(10), and thus we have the factorization
x^2-8x+6=(x-4-sqrt(10))(x-4+sqrt(10))