Radii of inscribed and circumscribed circles in right-angled triangle In a right angled triangle, △ ABC, with sides a and b adjacent to the right angle, the radius of the inscribed circle is equal to r and the radius of the circumscribed circle is equal to R. 
Prove that in △ABC, $a+b=2\cdot \left(r+R\right)$. 

 A: We have the following two formulas for $R$ and $r$:


*

*$$R=\tfrac12c=\tfrac12 \sqrt{a^2+b^2}$$


($c^2=a^2+b^2$ by Pythagoras.)


*

*$$r=\dfrac{ab}{a+b+c}$$


(proof: the area of the (right) triangle ABC, i.e.,  $\tfrac12ab$ is equal to the sum of the areas of triangles $IBC, ICA, IAB$, i.e.,  $\tfrac12ra+\tfrac12rb+\tfrac12rc$, where $I$ is the center of the inscribed circle.)
Thus we have to prove that 
$$\tag{1}a+b=2\dfrac{ab}{a+b+\sqrt{a^2+b^2}}+2\tfrac12 \sqrt{a^2+b^2}$$
In fact,  (1) is equivalent with:
$$\tag{2}a+b-\sqrt{a^2+b^2}=\dfrac{2ab}{a+b+\sqrt{a^2+b^2}} $$
itself equivalent to:
$$\tag{3}(a+b)^2-(\sqrt{a^2+b^2})^2=2ab$$
which is true.
A: Another method is to notice that, by letting $D,E,F$ be the points where the inscribed circle meets $BC, AC, AB$, we know that $r = CD = CE$ (because CD,CE and two radii form a square), hence $$r = CD =  \frac{a+b-c}{2} \implies a+b = c+2r = 2(r+R)$$
Note: The length of CD comes from solving the linear equation $BD + CD = a$, $AE + CE = b$, $AF + BF = c$, and $CD = CE$, $AE = AF$, $BD = BF$ to get $CD = CE=\frac{a+b-c}{2}$, $AE = AF = \frac{b+c-a}{2}$, $BD = BF = \frac{a+c-b}{2}$.
A: 
$$( a - r ) + (b - r ) = 2 R $$
