Find The Angle

Geometry Level 5

Let $$\triangle ABC$$ be a triangle with side lengths $$BC=10, CA= 12, AB= 8.$$ Let $$M$$ be the midpoint of $$BC,$$ and let $$D,E$$ be the feet of perpendiculars from $$B,C$$ to $$CA, AB$$ respectively. $$P, Q$$ are the midpoints of $$MD$$ and $$ME$$ respectively. Let $$\ell$$ be the line passing through $$A$$ parallel to $$BC.$$ $$QP$$ intersects $$\ell$$ at point $$X.$$ Given that $$\cos \angle CMX = \dfrac{x}{y}$$ for some coprime positive integers $$x,y,$$ find $$x+y-31.$$