Take a look a the pic. As you can see the first rectangle has:
-x - x -x + 1 +1 +1 +1 +1 +1 +1 +1 +1 +1 = -3x + 10
And the second rectangle has:
x + x + x + x +x -1 -1 -1 -1-1 -1-1 -1 = 5x - 8
Since they are equivalent:
-3x + 10 = 5x - 8
Solving for x:
Add 3x to both sides:
-3x + 10 + 3x = 5x - 8 + 3x
10 = 8x - 8
Add 8 to both sides:
10 + 8 = 8x - 8 + 8
18 = 8x
Divide both sides by 8:
18/8 = 8x/8
2.25 = x
x = 2.25