side lengths of the squares are x and y
4x+4y=52
divide both sides by 4 for simlicity
x+y=13
area is 89 so
x²+y²=89
ok
so
x+y=13
minus x both sides
y=13-x
sub that for y in other equation
x²+y²=89
x²+(13-x)²=89
x²+x²-26x+169=89
2x²-26x+169=89
minus 89 both sides
2x²-26x+80=0
undistribute 2
2(x²-13x+40)=0
factor
2(x-8)(x-5)=0
set to zero
x-8=0
x=8
x-5=0
x=5
x=5 or 8
find y
y=13-x
13-8=5
13-5=8
each square has side length of 5 or 8
perimiter is 4 times the area around so
5*4=20
8*4=32
the perimiters are 20cm and 32cm