Question: ICTM State 2017 Division AA Precalculus Individual Question 17 reads:

$C$ and $D$ lie on $BE$ such that $AC$ and $AD$ trisect $\angle$BAE in $△ABE$. $BC = 2$, $CD = 3$, and $DE = 6$. Then the perimeter of $△ABC$ may be expressed as $P = f + k \sqrt{w} + p \sqrt{q}$ in simplified and reduced radical form. Determine the sum $(f+k+w+p+q)$. See figure below

[![enter image description here](https://i.stack.imgur.com/3k4Mt.png)](https://i.stack.imgur.com/3k4Mt.png)

**What I tried.**

I tried to create a system of equations equating the angles of the three triangles to 180°. I also equated the supplementary angles.

There were not enough equations to solve for every variable.

Answer: 
Let: $b=AB$, $c=AC$, $d=AD$, $e=AE$, $\alpha=\angle BAC=\angle CAD=\angle DAE$.

From the bisector theorem we get: $e=2c$ and $d={3\over2}b$. From the cosine law we then obtain:
$$
b^2+c^2-2bc\cos\alpha=4,\quad
c^2+{9\over4}b^2-3bc\cos\alpha=9,\quad
{9\over4}b^2+4c^2-6bc\cos\alpha=36.
$$
We can easily eliminate $bc\cos\alpha$ and
solve for $b^2$ and $c^2$, obtaining $b=2\sqrt{10}$, $c=3\sqrt6$. Hence $e=6\sqrt6$ and the perimeter can be computed.
Let $AB=x$.

Thus, since $$\frac{AD}{AB}=\frac{CD}{BC},$$ we obtain
$$\frac{AD}{x}=\frac{3}{2},$$ which gives
$$AD=\frac{3}{2}x.$$
Also, let $AC=y$.

Thus, since $$\frac{AE}{AC}=\frac{DE}{DC},$$ we obtain $AE=2y$.

But, $$AC^2=AB\cdot AD-BC\cdot CD$$ and
$$AD^2=AC\cdot AE-CD\cdot DE,$$ which gives
$$y^2=\frac{3}{2}x^2-6$$ and
$$\frac{9}{4}x^2=2y^2-18.$$
After solving of this system we obtain: $x=2\sqrt{10},$ $y=3\sqrt{6}$, $P=11+2\sqrt{10}+6\sqrt{6},$ 

which gives the answer: $35$.