You are looking for the difference in perimeters, or

.

or
 + 2w)
. Factoring yields
)
.
To get the

out of the equation, you can use the fact that areas are the same. The perimeter of the square is

, which means the length of a side is

, making the area

. The area of the rectangle is
w)
or

. The relationship is then

and

.
Plugging this into the formula for the rectangle perimeter, you can see that
=\frac{L}{2\sqrt{x} }(x+1))
.
The differences in perimeters (the answer to the original part b question) is then
-L)
. You can rationalize this, factor it, distribute, or whatever other simplification you want. The form I kinda like is
)
.
Using this final version of the formula to solve part a (plugging in 4 for x and 160 for L), I get 520 mm. If that's the right answer to part a then I'm pretty comfortable with it.