We can always set up a coordinate system such that the vertices of the triangle are at (0, 0), (a, 0), and (b, c). One side is the horizontal line y= 0 and the altitude on that side is x= b. Another side is y= cx/b. Any line perpendicular to that has slope -b/c. The altitude on that side must pass through (a, 0) so has equation y= -b(x- a)/c. The third side has equation y= c(x- a)/(b- a) so has slope c/(b- a). Any line perpendicular to that has slope (a- b)/c. The altitude on that side must go through (0, 0) so has equation y= (a- b)x/c.
Show that there exist a unique (x, y) satisfying x= b. y= -b(x- a)/c, and y= (a- b)x/c.
When x = b, the last two equation are the same. In the second equation, change x to b to make y = -b(b - a)/c. In the third equation, change x to b and put the b in front to make y =b(a - b)/c. Multiplying the parenthesis and changing the order of the terms makes both equation become y = (ab - b^2)/c.