Doubt regarding error in solution

,

Here’s a link to my solution for the ZCO 2015 problem rectangles. I’ve figured out how to find the right answer with other solutions but I don’t understand why this solution doesn’t work. Any help can be very useful thank you.