True.
Let's call the sides of the two right triangles as follows:
Triangle 1: legs a,b, hypothenuse c.
Triangle 2: legs x,y, hypothenuse z.
Suppose we know that a=x and c=z. By Pythagorean theorem, we have for both triangles

So, in triangle 1 we have

while in triangle 2 we have

But since a=x and c=z, the second equation becomes

Solve the equations for y^2 and b^2: we have in both cases

This, in theory, would mean
, but they are length of a triangle, and thus are both positive, which concludes the proof.