If there are 2 right triangles and they share a common height and one equal side, then the 3rd side should be equal as well?
Consider a $\triangle ABC$ with $AD$ as the perpendicular dropped on $BC$.
Case 1: hypotenuses are of equal length, i.e., $AB = AC$. Congruence can be proved using Hypotenuse-Leg rule.
Case 2: bases are of equal length, i.e., $BD = DC$. Congruence can be proved using Side-Angle-Side rule.
Draw a segmet with lenght $a$ and a perpendicular to it with lenght $h$. We chose theirs intersection anywhere we want, so there are infinitely many triangles satisfying the given condition.
If they share another side (not the side, for which we know it's respective height), then we have 2 right triangles. They'll share one of those triangles, but not necessarily the other
Considering the edit, if they share the same hypotenyse and the same height then those triangles are equal. To prove it, construct the circumcircle of the one triangle and since the lenght of the hypotenuse is a diametar, construct a perepndicular and see how many times the perpendicular line intersects the circumcircle, when it's length is $h$.
When the side they share is a leg the two triangles are equal again. To prove it use the fact that the height divides the hypotenus in 2 segments. We can easily find the length of the one segment (or more accurately we can prove there's only one possibility) usign Pythagorean Therorem.
And we can find the length of the other segment, i.e. prove there's only one solution using right triangle altitude theorem, hence the proof.