Let "a" and "b" be some number where:
a - b = 24
We want to find where a^2 + b^2 is a minimum. Instead of just logically figuring out that the answer is where a=b=12, I'll just use derivatives.
So we can first substitute for "a" where a = b+24
So we have (b+24)^2 + b^2 = b^2 +48b +576 + b^2
And that equals 2b^2 +48b +576
Then we take the derivative and set it equal to zero:
4b +48 = 0
4(b+12) = 0
b + 12 = 0
b = -12
Thus "a" must equal 12.
So:
a = 12
b = -12
And the sum of those two numbers squared is (12)^2 + (-12)^2 = 144 + 144 = 288.
The smallest sum is 288.