For the first rectangle, the linear equation is y=4x+4 and for the second one it's y=6x-6
The solution is y=14 and x=2.5