x, y - the numbers
[tex]xy=24 \\
x+y=25 \\ \\
\hbox{solve the second equation for y:} \\
x+y=25 \\
y=25-x \\ \\
\hbox{substitute 25-x for y in the first equation:} \\
x(25-x)=24 \\
25x-x^2=24 \\
-x^2+25x-24=0 \\
-x^2+24x+x-24=0 \\
-x(x-24)+1(x-24)=0 \\
(-x+1)(x-24)=0 \\
-x+1=0 \ \lor \ x-24=0 \\
x=1 \ \lor \ x=24 \\ \\
y=25-x \\
y=25-1 \ \lor \ y=25-24 \\
y=24 \ \lor \ y=1[/tex]
The numbers are 1 and 24.