Let's assume that the first number mentioned is x.
x^2 - 14 = 5x
x^2 - 5x - 14 = 0
From here you can factor or use the quadratic formula. Factoring is easier so:
(x - 7)(x+2) = 0
=> x=7 or x=-2
Remember when factoring the factors of the constant have to add up to be the coefficient of x.