Triangle $ABC$ is an isosceles right triangle with $AB=AC=3$. Let $M$ be the midpoint of hypotenuse $\overline{BC}$. Points $I$ and $E$ lie on sides $\overline{AC}$ and $\overline{AB}$, respectively, so that $AI>AE$ and $AIME$ is a cyclic quadrilateral. Given that triangle $EMI$ has area $2$, the length $CI$ can be written as $\frac{a-\sqrt{b}}{c}$, where $a$, $b$, and $c$ are positive integers and $b$ is not divisible by the square of any prime. What is the value of $a+b+c$?
So I think Ptolemy's theorem might work (especially bc EI is both an internal diagonal of quad AIME and also bc it's the base of triangle EMI), except that the sides of AI, IM, ME and EA are all unknown. But I couldn't really think of any other way to solve this problem. Any help would really be appreciated!
Update: I think I could use that fact that cyclic quads' opp angles sum to 90° so $\angle EMI = 90$°... I think I get a circle inscribed in a square, but that doesn't really make much sense bc $AI>AE$.

Since $\overline{CM} = \overline{AM}$, $\angle MAE = \angle MCI$, $\angle MAE = \pi - \angle MIA = \angle MIC$, $\triangle MEA \cong \triangle MIC$.
In particular, $\overline{ME} = \overline{MI} = 2$ and $\overline{AE} = \overline{CI} = 3 - \overline{AI}$.
So $\overline{CI} = \overline{AE}$ will be the smaller solution of $x^2 + (3-x)^2 = (2\sqrt2)^2$ by the Pythagorean theorem.