the numbers: x, y
x·y=-14
x+y=5 ⇒ y=5-x
Substitute y in the first equation by y from second one
x·(5-x)=-14
5x-x²=-14
-x²+5x+14=0
-x²-2x+7x+14=0
-x(x+2)+7(x+2)=0
(x+2)(-x+7)=0
Product is 0 if one of factors is 0
x+2=0 or -x+7=0
x=-2 or -x=-7
x=-2 or x=7
Now back to the equation y=5-x
y=5-(-2) or y=5-7
y=7 or y=-2
The numbers are -2 and 7