TITLE: Prove $a+b \leq 1$ with two disjoint squares in a larger square.
QUESTION [5 upvotes]: Two disjoint squares are located inside a square of side $1$. If the lengths of the sides of the two squares are $a$ and $b$, prove $a+b \leq 1$.

I thought about setting up a coordinate axes with the leftmost vertex of the square at the origin. Then I will have to show that the sum of the side lengths is less than or equal to $1$ while the two squares being disjoint and still inside the square. This is where I get stuck.

REPLY [2 votes]: [ NOTE: this is a heavy edit of the original answer, which fixes a wrong assumption and adds some more detail. ]
Here is the outline of a proof. The squares will be considered "open sets" i.e. not including their actual borders, which allows for a vertex of one square to lie on the side of the other, or two sides from different squares to overlap - and still be disjoint. (With the alternative interpretation of squares as "closed sets" the inequality would become a strict one $a + b \lt 1$.)
The proof relies on the following two propositions.
(1) A line can be drawn which separates the squares into different half-planes.
This follows from the general statement about separability of convex bodies in an n-dimensional Euclidian space known as the Hyperplane separation theorem:

if both disjoint convex sets are open, then there is a hyperplane in between them

In the 2-dimensional case, the hyperplane is simply a straight line, and one such possible line is actually the separating bitangent (common tangent) of the two convex areas.
(2) Let $\Delta ABC$ be a right triangle with the right angle at $A$. The largest square "inscribed" in $\Delta ABC$ has a vertex at $A$, two sides along the legs $AB, AC$, and $AA'$ as a diagonal, where $A' \in BC$ is the foot of the bisector through $A$.
For an arbitrary triangle (not necessarily a right one), it can be shown that the largest inscribed square has two vertices on one side of the triangle, and (at least) one other vertex on another side. It can also be shown that the side of the square is $\frac{a h}{a + h}$ where $a$ is the length of the side where the square "sits" and $h$ is the length of the corresponding altitude. This is proved for example at Maximum area of a square in a triangle.
In the case of a right triangle, there are just two candidate such squares, one "sitting" on both legs, the other one on the hypothenuse.

Let $a, b, c$ be the lengths of the sides, and $h$ the length of the altitude through $A$. Then the general formula gives the sides of the squares as $\frac{b c}{b + c}$ and  $\frac{a h}{a + h}$ respectively. To conclude the proof, it remains to be shown that:
$$
\frac{b c}{b + c} \ge \frac{a h}{a + h}
$$
Noting that $b c = a h = 2 S$ where $S$ is the area of the triangle, and $h = \frac{b c}{a}$, the inequality reduces to:
$$
a + \frac{b c}{a} \ge b + c \\
a^2 - a (b + c) + b c \ge 0 \\
(a - b) (a - c) \ge 0
$$
Since $a \ge b, c$ the last inequality holds, and proposition (2) is thus proved.
Now, back to the question in point here. By proposition (1) there is a line separating the two inner squares, for example:

If the separating line is parallel to one of the sides of the outer square, then each inner square can be inscribed in a larger one with sides parallel to the outer square edges, and the two newly constructed squares have sides which obviously add up to $\le 1$ so it follows that $a + b \le 1$.

If the separating line is not parallel to any of the outer square sides, then it will intersect all of them - two internally (within the side segments of the outer square) and two externally. This forms two right angle triangles sharing part of the hypothenuse, each of them containing one of the inner squares. From proposition (2) each of the inner squares must be smaller than the respective one drawn in red, whose sides obviously add up to $1$, so it again follows that $a + b \le 1$, which concludes the proof.

(This last drawing shows the case when the separating line intersects two opposite edges of the outer square. The layout is slightly different in the other case, when it intersects two adjacent edges, but the same construction and same argument apply in that case as well.)
P.S. I am a bit curious about the background/context of this question, since it doesn't look like a run-of-the-mill exercise.