Given a right triangle with legs $$a$$ and $$b$$, inradius $$r$$, and circumradius $$R$$:
$$\large (a-r) + (b-r) = 2 R \quad\to\quad a + b = 2 ( R + r )$$