Hello !
We know that a square has all equal sides.
That means the side 3x+39 is equal to the side 3(5x-3):
3x+39 = 3(5x-3)
3x+39 = 15x-9 | - 3x
3x-3x+39 = 15x-3x-9
39 = 12x-9 | + 9
39 + 9 = 12x-9+9
48 = 12x | ÷ 12
x = 48/12 ⇔ x = 4
So,one side is 3*4 + 39 = 12 + 39 = 51
And the other side is 3(5*4 - 3) = 3(20-3) = 3*17 = 51
As you can see,the sides are equal.