This answer to a slightly different problem
gives a useful diagram showing how to compute the distance between the points
of tangency of two circles and a line, given that the circles are externally tangent
(as yours are).
From this we see that if we label the three points of tangency $A,$ $B,$ and $C$
(in sequence from the leftmost such point to the rightmost in your diagram), then
considering just the two circles of radius $r_1$ and $r_3$, which touch
the line at $A$ and $B$,
$$ |AB| = 2\sqrt{r_1 r_3}. $$
For the other two pairs of circles we get
$ |BC| = 2\sqrt{r_2 r_3} $ and
$ |AC| = 2\sqrt{r_1 r_2}.$
We can also see that $ |AC| = |AB| + |BC|;$ substituting the formulas we just found
for those three lengths (or perhaps even better still, labeling the three distances
$ 2\sqrt{r_1 r_3},$ $ 2\sqrt{r_2 r_3},$ and $2\sqrt{r_1 r_2}$ on your diagram),
$$ 2\sqrt{r_1 r_3} + 2\sqrt{r_2 r_3} = 2\sqrt{r_1 r_2}.$$
I can't think of a visual representation of the last step, but algebraically,
you can divide all three terms by $2\sqrt{r_1 r_2 r_3}$ to get
$$ \frac1{\sqrt{r_2}} + \frac1{\sqrt{r_1}} = \frac1{\sqrt{r_3}},$$
which is your simplified formula. You can then get the other formula by further
algebraic manipulation.