Let the length of the side of square be x cm.
Then, the length of side of the triangle is (x+4) cm.
The perimeter of the square is 4x cm.
The perimeter of the equilateral triangle
= (x + 4) + (x + 4) + (x +4)
= 3(x+4) cm
According to the question, ⇒4x=3(x+4)⇒4x=3x+12⇒4x−3x=12⇒x=12
So, the length of the side of the square is 12 cm.
Perimeter of the square
=4×12=48 cm