In $\triangle{ABC}$ with $AB = 12$, $BC = 13$, and $AC = 15$, let $M$ be a point on $\overline{AC}$ such that the [incircles](https://artofproblemsolving.com/wiki/index.php/Incircle) of $\triangle{ABM}$ and $\triangle{BCM}$ have equal [radii](https://artofproblemsolving.com/wiki/index.php/Inradius). Then $\frac{AM}{CM} = \frac{p}{q}$, where $p$ and $q$ are relatively prime positive integers. Find $p + q$.
Solution 1
Let $AM = x$, then $CM = 15 - x$. Also let $BM = d$ Clearly, $\frac {[ABM]}{[CBM]} = \frac {x}{15 - x}$. We can also express each area by the rs formula. Then $\frac {[ABM]}{[CBM]} = \frac {p(ABM)}{p(CBM)} = \frac {12 + d + x}{28 + d - x}$. Equating and cross-multiplying yields $25x + 2dx = 15d + 180$ or $d = \frac {25x - 180}{15 - 2x}.$ Note that for $d$ to be positive, we must have $7.2 0$, or $AM>7-1/3>6$, so $AM=22/3$, $CM=15-22/3=23/3$, $AM/CM=22/23$.

Solution 5
Let the common inradius equal r, $BM = x$, $AM = y$, $MC = z$
From the prespective of $\triangle{ABM}$ and $\triangle{BMC}$ we get:
$S_{ABM} = rs = r \cdot (\frac{12+x+y}{2})$ $S_{BMC} = rs = r \cdot (\frac{13+x+z}{2})$
Add two triangles up, we get $\triangle{ABC}$ :
$S_{ABC} =  S_{ABM} +  S_{BMC} = r \cdot \frac{25+2x+y+z}{2}$
Since $y + z = 15$, we get:

$r = \frac{S_{ABC}}{20 + x}$

By drawing an altitude from $I_1$ down to a point $H_1$ and from $I_2$ to $H_2$, we can get:
$r \cdot cot(\frac{\angle A}{2}) =r \cdot A H_1 = r \cdot \frac{12+y-x}{2}$  and
$r \cdot cot(\frac{\angle C}{2}) = r \cdot H_2 C =  r \cdot \frac{13+z-x}{2}$
Adding these up, we get:
$r \cdot (cot(\frac{\angle A}{2})+cot(\frac{\angle C}{2})) = \frac{25+y+z-2x}{2} = \frac{40-2x}{2} = 20-x$

$r = \frac{20-x}{cot(\frac{\angle A}{2})+cot(\frac{\angle C}{2})}$

Now, we have 2 values equal to r, we can set them equal to each other:

$\frac{S_{ABC}}{20 + x} = \frac{20-x}{cot(\frac{\angle A}{2})+cot(\frac{\angle C}{2})}$ 

If we let R denote the incircle of ABC, note:
AC = $(cot(\frac{\angle A}{2})+cot(\frac{\angle C}{2})) \cdot R = 15$ and
$S_{ABC} = \frac{12+13+15}{2} \cdot R = 20 \cdot R$. 
By cross multiplying the equation above, we get:

$400 - x^2 = (cot(\frac{\angle A}{2})+cot(\frac{\angle C}{2})) \cdot S_{ABC} = (cot(\frac{\angle A}{2})+cot(\frac{\angle C}{2})) \cdot R \cdot 20 = 15 \cdot 20 = 300$

We can find out x:

$x = 10$.

Now, we can find ratio of y and z:

$\frac{AM}{CM} = \frac{y}{z} = \frac{S_{ABM}}{S_{BCM}} = \frac{r \cdot \frac{22+y}{2} }{r \cdot \frac{23+z}{2}} = \frac{22+y}{23+z} = \frac{22}{23}$ 

The answer is $\boxed{045}$. 
-Alexlikemath

Solution 6 (Similar to Solution 1 with easier computation)
Let $CM=x, AM=rx, BM=d$. $x+rx=15\Rightarrow x=\frac{15}{1+r}$.
Similar to Solution 1, we have 
\[r=\frac{[AMB]}{[CMB]}=\frac{12+rx+d}{13+x+d} \Rightarrow d=\frac{13r-12}{1-r}\]
as well as
\[12^2\cdot x + 13^2 rx=15x\cdot rx+15d^2 (\text{via Stewart's Theorem})\]
\[\frac{(12^2 + 13^2r) \cdot 15}{1+r} - \frac{15r\cdot 15^2}{(1+r)^2}=\frac{15(13r-12)^2}{(1-r)^2}\]
\[\frac{169r^2+88r+144}{(1+r)^2}=\frac{(13r-12)^2}{(1-r)^2}\]
\[(169r^2+88r+144)((r^2+1)-2r)=(169r^2-312r+144)((r^2+1)+2r)\]
\[(r^2+1)(400r)=2r(338r^2-224r+288)\]
\[100(r^2+1)=169r^2-112r+144 \Rightarrow 69r^2-112r+44=(23r-22)(3r-2)=0\]
Since $d=\frac{13r-12}{1-r}>0$, we have $r=\frac{22}{23} \longrightarrow \boxed{045}$.
~ asops

Solution 7 (No Stewart's or trig, fast + clever)
Let $BM = d, AM = x, CM = 15 - x$. Observe that we have the equation by the incircle formula:
\[\frac{[ABM]}{12 + AM + MB} = \frac{[CBM]}{13 + CM + MB} \implies \frac{AM}{CM} = \frac{12 + MB}{13 + MB} \implies \frac{x}{15 - x} = \frac{12 + d}{13 + d}.\]
Now let $X$ be the point of tangency between the incircle of $\triangle ABC$ and $AC$. Additionally, let $P$ and $Q$ be the points of tangency between the incircles of $\triangle ABM$ and $\triangle CBM$ with $AC$ respectively. Some easy calculation yields $AX = 7, CX = 8$. By homothety we have
\[\frac{AP}{7} = \frac{CQ}{8} \implies 8(AP) = 7(CQ) \implies 8(12 + x - d) = 7(13 + 15 - x - d) \implies d = 15x - 100.\]
Substituting into the first equation derived earlier it is left to solve
\[\frac{x}{15 - x} = \frac{15x - 88}{15x - 87} \implies 3x^2 - 40x + 132 \implies (x - 6)(3x - 22) = 0.\]
Now $x = 6$ yields $d = -10$ which is invalid, hence $x = \frac{22}{3}$ so $\frac{AM}{CM} = \frac{\frac{22}{3}}{15 - \frac{22}{3}} = \frac{22}{23}.$ The requested sum is $22 + 23 = \boxed{45}$. ~blueprimes