let the two numbers be x and y
From the first sentence
xy=24.......(1)
x+y=10......(2)
from equation 2 make y the subject of the formular and substitute it in equation 1
y=10-x
in equation one
x(10-x)=24
10x-x^2=24
=-x^2+10x=24
transfer the constant 24 to the left hand side and equate it to 0
=-x^2+10x-24=0
Then factorise completely