Let s represent the short side of the triangle. The long sides of the triangle are each s+1, and the triangle's perimeter is
... s + (s+1) + (s+1) = 3s+2
The length of one side of the square is s-2, and its perimeter is 4 times that, 4(s-2) = 4s-8. The square and triangle have the same perimeter, so
... 3s+2 = 4s-8
... 10 = s . . . . . . . . add 8-3s to both sides
The length of the shorter side of the triange is 10 units.