Let one number be x. Then, the other number is (24−x).
( ∵ sum of the two numbers is 24) Let y denotes the product of the two numbers. Thus, we have y=x(24−x)=24x−x2
On differentiating twice w.r.t. x, we get dxdy=24−2x and dx2d2y=−2
Now, put dxdy=0 ⇒24−2x=0 ⇒x=12
At x=12,dx2d2y=−2<0
By second derivative test, x=12 is the point of local maxima of y. Thus, the product of the numbers is maximum when the numbers are 12 and 24−12=12.
Hence, the numbers are 12 and 12.