2010 AIME I Problem 15

In \triangle A B C with A B=12, B C=13, and A C=15, let M be a point on \overline{A C} such that the incircles of \triangle A B M and \triangle B C M have equal radii. Let p and q be positive relatively prime integers such that \frac{A M}{C M}=\frac{p}{q}. Find p+q.