Problem
Let $M$ be a point on the side $BC$ of $\triangle ABC$ such that the radiuses of the incircles of $\triangle ABM$ and $\triangle ACM$ are equal. Then
$$AM^2=p(p-a),$$
where $p$ is the semi-perimeter, $a$ is the length of $BC$.
Proof
Let $I,I_1,I_2$ be the incenter, $p,p_1,p_2$ be the semi-perimeter, and $r,r_0,r_0$ be the radius of the incircle, of $\triangle ABC, \triangle ABM, \triangle ACM$ respectively, $E,F,P,Q$ be the tangent point as the figure shows. Moreover, denote $BC=a,CA=b,AB=c$.
Obviously,$$p_1+p_2=p+AM.\tag1$$ Moreover, since $$S_{\triangle ABM}+S_{\triangle ACM}=S_{\triangle ABC},$$ then $$p_1r_0+p_2r_0=pr,$$ thus $$\frac{r_0}{r}=\frac{p}{p_1+p_2}=\frac{p}{p+AM}.\tag2$$
Besides, notice that $$\frac{r_0}{r}=\frac{BE}{BF}=\frac{CP}{CQ},$$ thus $$\frac{r_0}{r}=\frac{BE+CP}{BF+CQ}=\frac{(p_1-AM)+(p_2-AM)}{(p-b)+(p-c)}=\frac{p_1+p_2-2AM}{a}=\frac{p-AM}{a}.\tag 3$$
From $(2),(3)$, $$\frac{p}{p+AM}=\frac{p-AM}{a},$$ which implies that$$AM^2=p(p-a).$$
Note
I would like to share the fact, which seems to be interesting. Hope to see other more elegant proofs.

This is a Sangaku, "one of Japanese geometrical problems or theorems on wooden tablets which were placed as offerings at Shinto shrines or Buddhist temples during the Edo period by members of all social classes". A good book describing these problems can be found on Amazon.
A solution of your problem can be found on Cut-the-Knot.
This well-known problem also has a slightly different form.
Prove that:
$$\cos\angle BMA=\frac{b-c}a$$
You can find two different proofs on Cut-the-Knot here.