Points $P$, $Q$, and $R$ lie on the same line. Three semi-circles with the diameters $PQ$, $QR$, and $PR$ are drawn on the same side of the line segment $PR$. (That is, suppose we have an arbelos.) The centers of the semi-circles are $A$, $B$, and $O$, respectively. A circle with center $C$ touches all three semi-circles. Show that the radius of this circle is $$c = \frac{ab(a+b)}{a^2+ab+b^2}$$ where $a :=|AQ|$ and $b :=|BQ|$ are the radii of the smaller two semi-circles.
I know that since this is a trigonometry question, I have to construct a triangle somewhere. However, I am unsure as to whether I should construct the triangle between points ACQ or points ACB.

Hint: Draw the figure and you will have $AC=a+c$, $BC=b+c$, $OA=b$, $OB=a$ and $OC=a+b-c$. Apply the cosine formula to find $\cos\angle BAC$ in
(1) $\triangle ABC$
(ii) $\triangle OAC$