The product of two numbers is 24. Their difference is 2. What are the two numbers?

ab = 24

a-b = 2
a = b+2

in ab=24
b(b+2) = 24
b^2 + 2b - 24 = 0
(b+6)(b-4) = 0
b = -6 or b = 4

if b = -6, then a = -4
if b = 4, the a = 6

the two numbers are 4 and 6 or -4 and -6