Let, the numbers are: x, (24-x)
Let, P(x) denote their products. Then, we have:
P(x) = x(24-x) = 24x - x²
P'(x) = 24-2x
P''(x) = -2
Now, P'(x) = 0 ⇒ x = 12
Also,
P''(12) = -2 < 0
So, By second derivative test, x = 12 is the point of local maxima of p. Hence the product of the numbers is the maximum when the numbers are 12 and (24-12) = 12
So, In short that numbers would be 12,12
Hope this helps!