Mark is building two separate pig-pens. The width of pig-pen A is w. The length of pig-pen A is 4 feet longer than its width. Th
e width of pig-pen B is 5 feet less than the width of pig-pen A. The length of pig-pen B is 2 times its own width. If the both pig-pens have the same perimeter, then find the dimensions of each pig-pen.