$$\triangle ABC :AC =BC$$ $$P \in AB$$
$k(O;r)$ is inscribed in $\triangle APC$; $k_2(O_2; r_2)$ is inscribed in $\triangle BPC$;
$D, G$ are points of contact of the circles with $CP$.
Show that $DG=\frac {|AP - BP|}{2}$.
I think that it will be helpful if we find point $A_1$, such that $BA_1 = AP$. Now we have to prove $2DG=PA_1$.



Hint:
Use the following fact/theorem.
If $ZX$ and $ZY$ are tangents from $Z$ to a circle so that $X,Y$ are touching points, then $ZX = ZY$.
Now it sholud be easy.
Another hint: Try to prove $$PG= PK = {PB+PC-BC\over 2}$$