Let a and b represent the numbers, then a+b=12 ands ab=54. Substitute b=12-a in the product: a(12-a)=54.
12a-a^2=54, so a^2-12a+54=0. Before applying the quadratic formula, we note that the result is going to b complex because the roots have to be positive because the constant 54 is positive and the minimum sum of the roots is greater than 12 (minimum would be about 14.7). For example, 1+54, 2+27, 3+18, 6+9, are all greater than 12. The formula gives (12+sqrt(144-216))/2=(12+sqrt(-72))/2=(12+6sqrt(-2))/2=6+3isqrt(2). In these solutions i is the imaginary number equal to the square root of -1. So the two numbers are 6+3isqrt(2) and 6-3isqrt(2). The sum of these is 12 and the product is 36+18=54.