
Write
c=AB=360, a=BC=507, b=CA=780. Extend
FD beyond
D to meet ray
BA beyond
A at
G. In triangle
BGF, segment
BD is both an angle bisector and an altitude, so
BG=BF=t. The bisector also gives
DACD=ca, so Menelaus’ theorem for line
GDF crossing triangle
ABC says
GBAG⋅FCBF⋅DACD=tt−c⋅a−tt⋅ca=1, so
t=a+c2ac.
Now let
F1 be the point on
AC with
FF1∥BM. Since
E lies on
BM, we have
EM∥FF1, so triangles
DEM and
DFF1 are similar and
EFDE=MF1DM. The bisector ratio gives
AD=a+cbc, so
DM=2b−a+cbc=2(a+c)b(a−c). Also
CF=a−t=a+ca(a−c), so
CF1=CM⋅CBCF=2b⋅a+ca−c and
MF1=2b(1−a+ca−c)=a+cbc.
Therefore
EFDE=MF1DM=2ca−c=720147=24049, and
m+n=49+240=289.