Three circles having centres on the three sides of a triangle NOTE: I would appreciate it if you provided a hint and not the whole solution.
BdMO 2014 Nationals:

In acute angled triangle ABC, considering a portion of side BC as diameter a 
  circle is drawn whose radius is 18 units and it touches AB and AC side. Similarly, 
  considering a portion of sides AC and AB as diameters, two other circles are 
  drawn whose radii are 6 and 9 units respectively. What is the radius of the incircle 
  of ∆ABC?

The main problem with this  problem is that the figure is incredibly messy.So I drew one circle,and tried getting information from it.I noticed that if $O$ is a centre of one of the above (semi)circles,and if $O$ is located on $AB$, then $CO$ is an angle bisector.Therefore,if we connect all the vertices with the centres,their intersection would be the incentre.Then we need to drop a perpendicular from this point to get the inradius.But that hardly helps us.I have found some similar triangles in the figure.But that does not help me at all.
I have also tried backtracking.I tried to put myself in the problem-maker's shoes and tried to imagine what I would do if I had to create a problem like this.Unfortunately,I couldn't do it..
Any insightful comment,hint will be very much  appreciated.
 A: Here's a (not-to-scale) picture of the situation:

Necessarily, each circle center ($D$, $E$, or $F$) is the point where an angle bisector meets an opposite edge; moreover, the points of tangency of a circle with the adjacent edges (for instance, $D^\prime$ and $D^{\prime\prime}$) are simply the feet of perpendiculars from the center to those edges.
We'll write $a$, $b$, $c$ for the lengths of sides $\overline{BC}$, $\overline{CA}$, $\overline{AB}$, and $d$, $e$, $f$ for the radii of $\bigcirc D$, $\bigcirc E$, $\bigcirc F$. Now, observing that each angle bisector cuts the triangle with into sub-triangles with convenient "bases" and "heights", we can compute the area, $T$, of $\triangle ABC$ in three ways:
$$T \;=\; \frac12 d\;(b+c) \;=\; \frac12 e\;(c+a) \;=\; \frac12 f\;(a+b) \tag{1}$$
Of course, writing $r$ for the inradius of $\triangle ABC$, we have a well-known fourth formula for area:
$$T \;=\; \frac12 r\;(a+b+c) \tag{2}$$
We can easily eliminate $a$, $b$, $c$ from the above. For instance,
$$\begin{align}
b+c = \frac{2T}{d}\quad c+a=\frac{2T}{e}\quad a+b = \frac{2T}{f} &\quad\to\quad 2(a+b+c) = 2T\left(\;\frac{1}{d}+\frac{1}{e}+\frac{1}{f}\;\right) \tag{3} \\
a+b+c = \frac{2T}{r} &\quad\to\quad 2(a+b+c) = 2T\left(\;\frac{2}{r}\;\right) \tag{4}
\end{align}$$
so that, as @Jack notes,

$$\frac{2}{r} = \frac{1}{d} + \frac{1}{e} + \frac{1}{f} \tag{$\star$}$$


Addendum (four years later!). As @jmerry has observed, the specific configuration in the problem statement is invalid. If we solve $(1)$ for $a$, $b$, $c$, we find
$$a = \left(-\frac1d + \frac1e + \frac1f \right)T \qquad b = \left(\frac1d - \frac1e + \frac1f \right)T \qquad c = \left(\frac1d + \frac1e - \frac1f \right)T$$
With $d=18$, $e=6$, $f=9$, these become $a=2T/9$, $b=0$, $c=T/9$, which do not correspond to a valid triangle ... not even a validly-degenerate one. (It's a good thing I didn't claim my picture was to scale.) A valid triangle requires that the three aspects of the Triangle Inequality hold
$$a \leq b+c \qquad b \leq c+a \qquad c \leq a+b$$
which, in turn, require
$$\frac3d \geq \frac1e + \frac1f \qquad \frac3e \geq \frac1f+\frac1d \qquad \frac3f \geq \frac1d+\frac1e$$
(The first of these is violated by the given values of $d$, $e$, $f$.)
A: The existing answers have provided the intended solution. On the other hand, there's a catch - the problem has a fatal flaw.
What can we say about the side lengths of the triangle? We have $b+c$, $a+c$, and $a+b$ in proportions $1:3:2$, so $a$, $b$, and $c$ are in proportions $2:0:1$. That is not a triangle; $a>b+c$.
Let the sides be $a,b,c$, the radii of the circles opposite them be $R_A,R_B,R_C$, and the area of the triangle be $T$, mixing notation from the answers of Blue and Jack D'Aurizio. The triangle inequality $a<b+c$ gives
$$\frac1{R_B}+\frac1{R_C}=\frac1{2T}(2a+b+c) < \frac1{2T}(3b+3c) = \frac3{R_A}$$
$$R_A < \frac{3R_BR_C}{R_B+R_C}$$
and similarly for the other two orders; the largest radius must be less than $\frac32$ times the harmonic mean of the other two. An acute triangle would be an even stronger restriction. For the given trio of radii $18,6,9$, this is not true.
As such, the true answer to the problem:
The given configuration is impossible. There is no such triangle.
A: 
Let $r$ denote the radius of the inscribed circle of triangle $ABC$
and radii of the circles be $r_a$, $r_b$, $r_c$.
Also, let the corresponding heights of the triangle $ABC$
be $h_a,h_b$ and $h_c$.
Construct $\triangle A_1B_1C$ for which
the circle $C$ is incircle, and $A_1B_1\parallel AB$.
as shown. 
Clearly,
\begin{align} 
r&=
r_c\,\frac{|CH_{c1}|}{|CH_{c}|}
=
\frac{r_c\,h_c}{h_c+r_c}
,\\
\text{or }\quad
\frac 1r&=\frac 1{r_c}+\frac 1{h_c}
.
\end{align} 
Similarly,
\begin{align} 
\frac 1r&=\frac 1{r_a}+\frac 1{h_a}
,\quad
\frac 1r=\frac 1{r_b}+\frac 1{h_b}
,\\
\text{hence }\quad
\frac 3r&=
\frac 1{r_a}+\frac 1{r_b}+\frac 1{r_c}
+
\frac 1{h_a}+\frac 1{h_b}+\frac 1{h_c}
\tag{*}\label{*}
.
\end{align} 
Combining \eqref{*} with a well-known relation
\begin{align} 
\frac 1r&=\frac 1{h_a}+\frac 1{h_b}+\frac 1{h_c}
,
\end{align}
we have
\begin{align} 
\frac 2r&=\frac 1{r_a}+\frac 1{r_b}+\frac 1{r_c}
.
\end{align}
Given $r_a=18$, $r_b=6$, $r_c=9$,
we must have $r=6$, but...
Given that $r$, we can find all the heights of $\triangle ABC$.
\begin{align} 
h_a&=\frac{r_a r}{r_a-r}
,\quad
h_b=\frac{r_b r}{r_b-r}
,\quad
h_c=\frac{r_c r}{r_c-r}
.
\end{align}
Since $r=r_b=6$,
the height $h_b$ must be infinite.
As far as
two circles with the same radius 
are touching two lines internally,
these lines must be parallel in this case.
Hence, the question is a trap,
and as @jmerry stated, 
the correct answer would be: there is no such triangle.
A: Obviously, the centers of the three circles are the feet $L_A,L_B,L_C$ of the angle bisectors. Let $I$ be the incenter. An homothethy gives that the radius of the circle on the $BC$-side is $\frac{AL_A}{AI}$ times the inradius $r$. Van Obel's theorem and the bisector theorem give:
$$\frac{AL_A}{AI}=\frac{a+b+c}{b+c},$$
hence we know the ratios between the side lengths of $ABC$. 
Moreover, if $R_A,R_B,R_C$ are the three radii of the circles, by the previous relation we get:
$$\frac{1}{R_A}+\frac{1}{R_B}+\frac{1}{R_C}=\frac{2}{r}.$$
