There are two parameters to this construction. Start with a ground square of some size, against it lean another square at some angle in range [0 .. 90°). The rightmost corner of this second square defines yet another ground square, and the free top corners define two towering squares as shown. All in all five squares are constructed.
The side of the starting square, the only one that stays put with changing angle, merely scales the geometry in a linear fashion. The dependency on the leaning angle is more complex, yet the area of the middle ground square is always the same as the triangle area between the two towering squares.
Try and show this.