Let the numbers be x and y. Then according to the statement of the question,
x + y = 25 ----- (1) and x2 + y2 = 425 --- --(2)
Squaring eq. (1) we get,
x2 + y2 +2 x y = 625 --(3)
==> 2 x y = 625 - 425 = 200 or x y = 100.
Now
(x + y)2 -4 xy = (x-y)2. Therefore
(x - y)2 = 625-400 = 225 = (± 15)?, ==> (x-y) = +15 -(4)
Using 1 and 4 we can solve for x and y. This yields,
(x,y) = (20,5) or (5,20).