we use the law of correspondence that is
Hypotenuse = Hypotenuse Leg = Leg
3y + x = y + 5
and
y - x = x + 5 --------------------------------- work on your first problem to find x
x = -2y + 5
now you can plug this in to your second equation to sub in for the x
y - ( -2y + 5 ) = ( -2y + 5 ) + 5 y + 2y - 5 = -2y + 10 3y - 5 = -2y + 10 5y = 15 y = 3
Now you can plug back in to solve for x
3y + x = y + 5 3(3) + x = (3) + 5 9 + x = 8 x = -1
so y = 3 and x = -1