Let A (a, b) be the vertex containing the right angle.

Let the equation of hypotenuse BC be y = m x + c

*we are given a, b, m, and c.*

L*et equation of AB* be : y = p x + q and point A is on AB.

b = a p + q => q = b - a p

So *equation of AB : * y = p (x - a) + b , p is a parameter that is the slope of AB. There are infinitely many lines AB possible.

*equation of AC* : y = -1/p ( x - a) + b , as A(a, b) on AC and its slope is -1/p as AC is perpendicular to AB.

Now,* the point B will be the intersection of BC* : y = m x + c and AB :

y = m x + c = p(x - a) + b

x (m -p) = b - c - a p

x = (b - c- a p) / (m - p)

y = m (b - c - a p) / (m - p)

* Now, the point of intersection of BC and AC is C:*

y = m x + c = -1/p * (x - a) + b

x (m + 1/ p) = b - c + a/p

x = (p b - p c + a) / (pm + 1)

y = m (p b - p c + a) / (p m + 1)

================

__The solution:__

Given hypotenuse BC: y = m x + c and A (a, b) , the vertex with right angle, we find the equations of AB, AC and the coordinates of B and C with a parameter p. *There are infinitely many such triangles.*

** AB: y = p (x - a) + b**

** AC : y = -1/p (x - a) + b**

** B = [ (b - c- a p) / (m - p), m (b - c - a p) / (m - p) ]**

** C = [ (p b - p c + a) / (pm + 1) , m (p b - p c + a) / (p m + 1) ]**