For both triangles to be congruent on the basis of hypotenuse-leg, HL, it means that
x + 1 = 3y
x = y + 3
We would substitute x = y + 3 into the first equation. it becomes
y + 3 + 1 = 3y
y + 4 = 3y
3y - y = 4
2y = 4
y = 4/2
y = 2
x = y + 3 = 2 + 3
x = 5