The combined area decreases as we increase the length AP:
As AP is increased beyond 1/2 the length of AB, the combined area will now increase, approaching the area of the square formed by AB:
The MAXIMUM combined area is when P is at either A or B: In these cases, one the othe "squares" has an area of zero and the other is equal to the area of the square formed by AB.
Point P should be located at the midpoint of AB to MINIMIZE the combined areas of the squares formed by AP and PB.
ALGEBRAIC SOLUTION.
Let's look at AP in increments of 1/8. When AP = 1/8AB, then PB = 7/8AB. The combined areas of the squares formed by each segment will then be
When AP = 2/8AB, then PB = 6/8AB, so the combined area will be
When AP = 3/8AB, then PB = 5/8AB, so the combined area will be
When AP = 4/8AB, then PB = 4/8AB, so the combined area will be
When AP = 5/8AB, then PB = 3/8AB, and the combined area will be the same as AP = 3/8AB and PB = 5/8AB. Again, the minimum combined area is 1/2 of the area of the square formed by AB.