In $\triangle ABC$, $AB=17$, $AC=25$, and $BC=28$. Points $M$ and $N$ are the midpoints of $\overline{AB}$ and $\overline{AC}$ respectively, and $P$ is a point on $\overline{BC}$. Let $Q$ be the second intersection point of the circumcircles of $\triangle BMP$ and $\triangle CNP$. It is known that as $P$ moves along $\overline{BC}$, line $PQ$ passes through some fixed point $X$. Compute the sum of the squares of the distances from $X$ to each of $A$, $B$, and $C$.

Let's think step by step and output the final answer within \boxed{}.
user