The sum of two positive numbers is 42. Find these numbers if their product

is a maximum

the area of a rectangle is max when it's a square.

So you want two numbers to be close to the same value.
So if x+y=42 and x=y=21 that will be a maximum.
To reassure yourself, just solve
a = x(42-x)
and find where da/dx = 0