In the general case of two rectangles overlaid such that they have one corner in common and each has a corner coinciding with the side of the other rectangle, it will produce a pair of similar triangles as below. From this we can tell that C/A=B/D. Cross-multiplying shows that AB=CD, in other words the two rectangles have the same area. So in the original figure, all four rectangles have the same area. We can’t know the exact length and width of the red and blue rectangles, but since the green and magenta rectangles also share an edge, that gives us enough information to solve the puzzle. If we call the height of the magenta rectangle ‘x’, then the height of the green rectangle is x-14.
36*(x-14)=27x
9x=36*14
x=56