Let x be one of the numbers. Because their difference is 12, the second number should be x - 12. Their product is,
x (x - 12) = P
x² - 12x = P
Differentiate both sides and equate to zero.
2x - 12 = dP/dt = 0
The value of x is equal to 6. The second number is -6.