# Triangle and Incircle

Today in class me and my friend were discussing cool problems that we've done. And he asked me to.find with proof something interesting. Triangle ABC has right angle at B and we drop a perpindicular from Point B to AC say point D. Then we draw incircles inside the two triangles BDC and BDA. Let the radius of the two incircles be p and q, respectively. How would we go about finding the radius of the incircle ABC.

EDIT:In terms of P and Q

-

Let's denote :$\bar {BC} =a , \bar {AB} =c ,\bar {AC} = b$
Note that triangles $BDC ,BDA, ABC$ are similar ,therefore :
$a : p=c : q = b :r = k \Rightarrow a=k\cdot p , c=k \cdot q , b= k\cdot r$
$b^2=a^2+c^2 \Rightarrow k^2r^2=k^2p^2+k^2q^2 \Rightarrow r^2=p^2+q^2 \Rightarrow r=\sqrt{p^2+q^2}$