It is given that a, b, and c are the sides of a triangle and c is the hypotenuse. There is an incircle inside the triangle with radius = r.
We need to prove that $r=\dfrac{a+b-c}{2}$
Image: 
My attempt
Area of circle = $\dfrac{ab}{2} = \dfrac{ar+br+cr}{2}$ (area of individual triangles)
$r=\dfrac{ba}{a+b+c}$
but we have to prove that $r=\dfrac{a+b-c}{2}$ . How can that be shown? Thank you very much
Quoting math.wichita.edu,