The perimeter of a square is 12 cm greater than that of another square. It's area exceeds the area of the other by 39 cm^2. Find the perimeter of each square.

4a = 4b+12

a^2 = b^2+39
(b+3)^2 = b^2+39
b^2+6b+9 = b^2+39
6b=30
b=5
so, a=8

check:
4*8 = 32 = 4*5+12
8^2 = 64 = 5^2+39