There are many ways to solve this problem, the shortest way is to use the following formula:
X² - SX + P =0, where S = sum and P = product
In the problem S=10 & P=12==> X² - 10X + 12 =0
It's a quadratic equation, and to solve it use the root formula:
x' = [-b+√(b² - 4ac)] / 2a and x" = [-b-√(b² - 4ac)] / 2a
x' = [10+√(10² - 4(1)(12))] / 2(1) and x" = [10-√(10² - 4(1)(12))] / 2(1)
x' = 5+√12 & x" = 5-√13
PROOF: x' + x " =10 & x'.x" = (25-13) =12