how to factorize x^2-2x-2 ?

Today, reading a calculus book, i looked at an example of find the intersection points, as it was interesting i made the slightest modification in the example to practice with... damn god.

After an hour i asked to two artificial intelligences, they used the bashkara formula, their answers is (x-(1+√3)) (x-(1-√3))