The length of a side of the second rectangle is (4 + x). The area if the second square is 32.
Thus, (4 + x)2 = 32
16 + 8x + x2 = 32
If we solve by completing the square:
x2 + 8x = 16
x2 + 8x + 16 = 16 + 16
(x + 4)2 = 32
abs. value (x + 4) = sqrt 32
x + 4 = 4sqrt2 or -4sqrt2
x = (4sqrt2 - 4) or (-4sqrt2 - 4)
Since x represents the length of a side of a square it can not be the negative number (-4sqrt2 - 4)
Thus x = 4sqrt2 - 4.