Given a line segment $s$, there are exactly two right triangles which have $s$ as a hypotenuse.
Is there a name for this theorem?
Assuming this line segment lies on a Cartesian plane, how can we compute the points at which the legs of these two triangles intersect?
It's not a theorem because it's false.
Given the segment, erect a perpendicular of any length to it at one end. Then connect the two open ends to make a triangle. It's a right triangle because of the perpendicularity, and one of the sides was arbitrarily chosen.EDIT: The above construction is faulty because the wrong side is the hypotenuse as pointed out in comments. Correction follows.
Correction: Given the segment, draw a ray from one end of the segment at any acute angle to the segment. Choose the unique line perpendicular to the ray that passes through the other end of the original segment. The triangle bounded by the original segment, the ray, and the line has the original segment as hypotenuse and is a right triangle because of the perpendicularity.