Let the first number be X and the 2nd number be Y
then X2 + Y2 = 1201 to satisfy the problem statement. Now note that Y is a consecutive number of X such that
Y = X + 1 , substitute the value of Y in the equation you get X2 + ( X +1)2 = 1201
Expand the equation you get X2 + X2 + 2 X + 1 = 1201 , then 2X 2 + 2x + 1 = 1201, and
2X2 + 2X -1200 = 0, Simplify , divide all terms by 2, you get X2 + X - 600 = 0 solve for X
X = -1 ± √ (1)2-4(1)(-600) / 2, X = -1 ± √2401 / 2, X = -1 ± 49 /2 ,
X = (-1 + 49) /2 = 24 , and X = (-1 - 49) /2 = -50, the negative value drops out then X = 24
and Y = X +1 = 24 + 1 = 25 , note that Y is a consecutive number of X
Check X2 + Y2 = 1201, (24)2 + ( 25)2 = 576 + 625 = 1201