The first thing we must do for this case is to define variables.
We have then:
x: sides of the triangle
y: sides of the square
The perimeter of the triangle is:

The perimeter of the square is:

We now write the system of equations that models the problem.
The side of a triangle with 3 equal sides is 7 inches shorter than the side of a square:

The perimeter of the square is 39 inches more than the perimeter of the triangle:

Resolving the system graphically we have that the solution is the ordered pair:
Note: See attached image for graphic solution.
Answer:
The length of a side of the square is:
