9 inches
Let x be the length of the side of the square.
If the base of the triangle is 3 times as long as the side of the square, it is 3 times x, or 3x.
The same can be said for the legs, which is 1 inch more than twice the side of the square, so 2x + 1.
The triangle can therefore be thought to look like the triangle below.
The perimeter is therefore (2x+1) + (2x+1) + 3x, which is 7x + 2.
The sum of perimeters of both the square and triangle is 46.
The perimeter of the square is 4x, so the sum of perimeters is 4x + (7x+2), or 11x + 2.
11x + 2 = 46, so 11x = 44.
x is therefore 4
The leg is 2x + 1, so the leg is 8 + 1, so the length of the leg is 9 inches.