Consult the rough sketch (attached)
AD bisects the angle BAC, so both angles BAD and DAC have the same measure.
Let F be the point on AC directly below the point E, so that EF is perpendicular to AC. (EF is the distance we want to find.)
Triangles AME and AFE are similar because they share the same interior angle measures (angle-angle-angle similarity), and are also congruent because they share the same hypotenuse AE.
This means EF = ME, so the the distance is 12.