You can work out the perimeter by working out the sum of twice the length (l) and twice the width (w).
2l + 2w = 72
The area is length (l) * width (w)
l * w = 315.
Now we just need to do some rearrangement and isolate one of the terms so we can substitute it back into the area equation.
2l + 2w = 72
2l = 72 - 2w
l = 36 - w
-------
l * w = 315
(36 - w) * w = 315
36w - w² = 315
w² - 36w + 315 = 0
(w - 21)(w + 15) = 0
w = -15 cannot be right, because it can't be negative, so w = 21.
Now that we know the width is 21, we can substitute it into the perimeter equation to work out the length.
2l + 2w = 72
2l + 2(21) = 72
2l + 42 = 72
2l = 72 - 42
2l = 30
l = 15.
Therefore, the width is 21 cm and the length is 15 cm.