Q:

Finding the Aspect Ratio for Stacked Boxes

I am trying to figure out how to calculate the ideal aspect ratio for a collection of boxes. All of the boxes always maintain the same aspect ratio, but can be scaled to fit the following layouts:

larger box on top, two smaller boxes taking up half of the width of the larger box arranged side-by-side beneath.
larger box to one side, two smaller boxes each taking up half the height of the larger stacked on the other side.

The total width is an unknown, but constant number for both layouts. The total height can vary. 
example: http://i.stack.imgur.com/mNLJW.png
Any help would be appreciated!

A:

There is no "ideal" aspect ratio as the layouts can always be achieved.
If the aspect ratio is $a:b$ and the width is $w$, then in the first layout the big box is $w\times \frac{bw}{a}$ and the small boxes are $\frac w2\times \frac{bw}{2a}$, so the height is $\frac{3bw}{2a}$. In the second layout  the big box is $\frac{2w}3\times \frac{2bw}{3a}$ and the small boxes are $\frac{w}3\times \frac{bw}{3a}$, so the height is $\frac{2bw}{3a}$. 

