I do not know who might have discovered this simple relationship first. I stumbled upon it while drawing figures in the notebook during a seminar.
Take any two squares such that they are joined at one side and the two sides of the respective squares perpendicular to the junction side lie along the same straight line in opposite directions. Join their corners as below. Then irrespective of the size of the squares points A, B, C and D are collinear.
This can be easily proved as below by placing the origin of the x-y coordinate axis at the lower left corner of the left square. Let be the side of the left square and the side of the right square.
-Then we can use the coordinates of the corners of the squares to obtain the equations of the 5 lines as shown in the figure.
-Solve and to obtain the coordinates of point B as,
-Solve and to obtained the coordinates of point C as
-These points satisfy . Hence, A, B, C, D are collinear.
-The angle between two lines with slope is,
Thus, the two intersections shown in the figure are always at right angles because .
-Hence, by the cyclic quadrilateral rule the top corners of the two squares on the junction sides define the diameter of a circle on which points B and C lie.
Now we see that the height (and width) of point B is the arithmetic mean of the sides of the two squares. But is there any significance to point C? From above it can be seen that the ratio of its coordinates is . As can be seen in the figure below it turns out that the coordinates of C are respectively ratio of the volume of two cuboids with sides and to the sum of the areas of the two squares. The ratio of the volumes of the cuboids is , i.e. ratio of the coordinates of C.