Let s = side length of the equilateral triangle;
Let x be the square's side length.
If the side length of the triangle s = 2x - 8, then x = ½(s+8)
The combined PERIMETER is therefore 4x + 3s = 101 in.
Solve for x after substituting in the above for s.
Once you have solved for x, the perimeter of the square, 4x, can be found.
Note: assumes the square and the equilateral triangle are not conjoined in any way.