[tex]x + y = 7~~~.....(i)\\\\xy=-30~~~~......(ii)\\\\\\\text{From (ii):}\\\\y= -\dfrac{30}x~~~~....(iii)\\\\\\\text{Substitute equation (iii) in equation (i):}\\\\\\x- \dfrac{30}x = 7\\\\\implies x^2 -30 = 7x\\\\\implies x^2 -7x -30 =0\\\\\implies x^2 -10x +3x -30 =0\\\\\implies x(x-10) +3(x-10) =0\\\\\implies (x+3)(x-10)=0\\\\\implies x = -3 ~~\text{or}~~ x=10\\\\\text{Substitute x = 10 in equation (iii):}\\\\\\y= -\dfrac{30}{10} =-3\\\\[/tex]
[tex]\text{Substitute x = -3 in equation (iii):}\\\\y = \dfrac{-30}{-3} =10\\\\\\\text{So, (x,y) =(10,-3) and (x,y)=(-3,10)}\\\\\\\text{Hence, the two numbers are}~ 10~ \text{and}~ -3.[/tex]