Problem: Equilateral triangle $\triangle ABC$ is inscribed in circle $\omega$ with radius $18.$ Circle $\omega_A$ is tangent to sides $\overline{AB}$ and $\overline{AC}$ and is internally tangent to $\omega.$ Circles $\omega_B$ and $\omega_C$ are defined analogously. Circles $\omega_A,$ $\omega_B,$ and $\omega_C$ meet in six points---two points for each pair of circles. The three intersection points closest to the vertices of $\triangle ABC$ are the vertices of a large equilateral triangle in the interior of $\triangle ABC,$ and the other three intersection points are the vertices of a smaller equilateral triangle in the interior of $\triangle ABC.$ The side length of the smaller equilateral triangle can be written as $\sqrt{a} - \sqrt{b},$ where $a$ and $b$ are positive integers. Find $a+b.$

Solution: [asy] /* Made by MRENTHUSIASM */ /* Modified by isabelchen */ size(250); pair A, B, C, W, WA, WB, WC, X, Y, Z, D, E; A = 18*dir(90); B = 18*dir(210); C = 18*dir(330); W = (0,0); WA = 6*dir(270); WB = 6*dir(30); WC = 6*dir(150); X = (sqrt(117)-3)*dir(270); Y = (sqrt(117)-3)*dir(30); Z = (sqrt(117)-3)*dir(150); D = intersectionpoint(Circle(WA,12),A--C); E = intersectionpoints(Circle(WB,12),Circle(WC,12))[0]; filldraw(X--Y--Z--cycle,green,dashed); draw(Circle(WA,12)^^Circle(WB,12)^^Circle(WC,12),blue); draw(Circle(W,18)^^A--B--C--cycle); dot("$A$",A,1.5*dir(A),linewidth(4)); dot("$B$",B,1.5*dir(B),linewidth(4)); dot("$C$",C,1.5*dir(C),linewidth(4)); dot("$\omega$",W,1.5*dir(270),linewidth(4)); dot("$\omega_A$",WA,1.5*dir(-WA),linewidth(4)); dot("$\omega_B$",WB,1.5*dir(-WB),linewidth(4)); dot("$\omega_C$",WC,1.5*dir(-WC),linewidth(4)); dot("$X$",X,1.5*dir(X),linewidth(4)); dot("$Y$",Y,1.5*dir(Y),linewidth(4)); dot("$Z$",Z,1.5*dir(Z),linewidth(4)); dot("$E$",E,1.5*dir(E),linewidth(4)); dot("$D$",D,1.5*dir(D),linewidth(4)); draw(WC--WB^^WC--X^^WC--E^^WA--D^^A--X); [/asy] For equilateral triangle with side length $l$ , height $h$ , and circumradius $r$ , there are relationships: $h = \frac{\sqrt{3}}{2} l$ $r = \frac{2}{3} h = \frac{\sqrt{3}}{3} l$ , and $l = \sqrt{3}r$
There is a lot of symmetry in the figure. The radius of the big circle $\odot \omega$ is $R = 18$ , let the radius of the small circles $\odot \omega_A$ $\odot \omega_B$ $\odot \omega_C$ be $r$
We are going to solve this problem in $3$ steps:
$\textbf{Step 1:}$
We have $\triangle A \omega_A D$ is a $30-60-90$ triangle, and $A \omega_A = 2 \cdot \omega_A D$ $A \omega_A = 2R-r$ $\odot \omega$ and $\odot \omega_A$ are tangent), and $\omega_A D = r$ . So, we get $2R-r = 2r$ and $r = \frac{2}{3} \cdot R = 12$
Since $\odot \omega$ and $\odot \omega_A$ are tangent, we get $\omega \omega_A = R - r = \frac{1}{3} \cdot R = 6$
Note that $\triangle \omega_A \omega_B \omega_C$ is an equilateral triangle, and $\omega$ is its center, so $\omega_B \omega_C = \sqrt{3} \cdot \omega \omega_A = 6 \sqrt{3}$
$\textbf{Step 2:}$
Note that $\triangle \omega_C E X$ is an isosceles triangle, so \[EX = 2 \sqrt{(\omega_C E)^2 - \left(\frac{\omega_B \omega_C}{2}\right)^2} = 2 \sqrt{r^2 - \left(\frac{\omega_B \omega_C}{2}\right)^2} = 2 \sqrt{12^2 - (3 \sqrt{3})^2} = 2 \sqrt{117}.\]
$\textbf{Step 3:}$
In $\odot \omega_C$ , Power of a Point gives $\omega X \cdot \omega E = r^2 - (\omega_C \omega)^2$ and $\omega E = EX - \omega X = 2\sqrt{117} - \omega X$
It follows that $\omega X \cdot (2\sqrt{117} - \omega X) = 12^2 - 6^2$ . We solve this quadratic equation: $\omega X = \sqrt{117} - 3$
Since $\omega X$ is the circumradius of equilateral $\triangle XYZ$ , we have $XY = \sqrt{3} \cdot \omega X = \sqrt{3} \cdot (\sqrt{117} - 3) = \sqrt{351}-\sqrt{27}$
Therefore, the answer is $351+27 = \boxed{378}$

Answer:  378