This problem have some interesting fact behind so I use pure geometry method to solve it to show these facts:
first we draw a picture.

$\triangle ABC$, $I$ is incenter, $A0,B0,C0$ are the tangent points of incircle. $R1,R2,R3$ is ex-circle center,their tangent points are $A1,B1,C1,A2,B2,C2,A3,B3,C3$.
FOR in-circle, we have $CA0=CB0=s-c,BA0=BC0=s-b,AB0=AC0=s-a$,
now look at circle $R2, BC2$ and $BA1$ are the tangent lines, so $BC2=BA1$,
for same reason, we have
$CA1=CB2,AC2=AB2$, and $CB2=AC-AB2$.
since $BA1=BC+CA1=BC+CB2=BC+AC-AB2,BC2=AB+AC2=AB+AB2$,
so we have
$BC+AC-AB2=AB+AB2$, ie$ AB2=\dfrac{BC+AC-AB}{2}=s-c=CB0, CB2=AC-AB2=AC-CB0=AB0=s-b$ .
with same reason, we have
$ AC2=BC0=s-b$,
$BC2=AC0=s-a,BA2=CA0=s-c,BA0=CA2=s-a$.
above facts are for any triangles as we don't have limits for the triangle.
now we check $R1-A2-C-B1$, since $R1A2=R1B1=r1$, so $R1-A2-C-B1$ is a square! we get
$r1=CA2=s-a$,
with same reason , we get
$ r2=CB2=s-b$,
we also konw $r3=R3A3=CB3$ ,
since $\angle B3AC2=\angle R3AB3$($AR3$ is bisector), so $AC2=AB3$,
$ r3=CB3=AC+AB3=AC+AC2=b+s-b=s$,
clearly:
$ r=IA0=CB0=s-c$
now we show the interesting fact:
$ r+r1+r2+r3=s-c+s-b+s-a+s=2s=a+b+c $
$ r^2+r1^2+r2^2+r3^2=(s-c)^2+(s-b)^2+(s-a)^2+s^2=4S^2+a^2+b^2+c^2-2s(a+b+c)=4S^2+a^2+b^2+c^2-2S*2S=a^2+b^2+c^2$
we rewrite the again:
In Right angle:
$ r+r1+r2+r3==a+b+c $
$ r^2+r1^2+r2^2+r3^2=a^2+b^2+c^2$