.
The standard way is to write a quadratic equation
x*(-5 - x) = -24,
where x is one of the two numbers and -5 - x is the other number.
Then you transform the equation into the simpler equivalent form
x*(x + 5) = 24,
x^2 + 5x - 24 = 0.
At this point, you can find the solution by using the quadratic formula or by factoring
(x+8)*(x-3) = 0.
The numbers are -8 and 3. ANSWER
There is much simpler way to solve the problem MENTALLY without using equations.
In such problems, as a rule, the solutions are integer numbers.
So, you try guessing the factors of the number -24 that sum up to -5.
You will try 24 = 12*2 = 6*4 = 8*3 and very fast you will find the ANSWER:
the numbers are -8 and 3, exactly the same as in the solution above.
After solving one - two - three such problems, you will be able to guess the answer MENTALLY and MOMENTARILY.
demonstrating a good style solving such problems.
But in that cases when such an approach does not work, you must apply the full scale solution using quadratic equations.