Let S be the side perimeter of the square and P be the side perimeter of the triangle
Let L be the side length of the square and l be the side length of the triangle
Perimeter of an equlateral triangle = 3l
Perimeter of a square = 4L
From the question
S = p
Substitute S = 4L and P = 3l in the above
4L = 3l
but L = 24, substitute
4 (24) = 3l
96 = 3l
Divide both-side of the equation by 3
32 = l
The side length of the triangle is 32 inches