Using (a slight modification of) the above characterisation, show that for $m <a,$ $$\mathbb{E}[|X-a| - |X-m|] = (a-m) ( P(X \le m) - P(X > a) ) + \mathbb{E}[(a + m - 2X)\mathbf{1}\{ X \in (m, a] \}].$$ You can further lower bound this by $$ (a-m) ( P(X \le m) - P(X > m) ) = (a-m) (2P(X \le m) - 1)$$ by noticing that for $X \in (m,a], a +m - 2X \ge -(a-m)$.
Now, $a - m > 0$, and by the definition of the median, $P(X \le m) \ge 1/2.$ Note that you cannot in general get a strict inequality - this is because the median need not be unique. To get this needs more work.
Since you wanted the first equality explained (this is just the argument angryavian poses, carried out in detail).
first, I'll edit your characterisation a little by making the first case be $X\le m$ and the second be $m < X \le a$. This clearly doesn't alter anything.
Now, for succinctness, let $f(X) := |X-a| - |X-m|.$ \begin{align}
\mathbb{E}[f(X)] &= \mathbb{E}[f(X) \mathbf{1}\{X \le m\}] + \mathbb{E}[f(X) \mathbf{1}\{m < X \le a\}] + \mathbb{E}[f(X) \mathbf{1}\{X > a\}]
\end{align}
Now, for $X \le m,$ $f(X) = a-m$. Similarly in other domains. Using htis, we have $$ \mathbb{E}[f(X)] = (a-m) \mathbb{E}[\mathbf{1}\{X \le m\}] + \mathbb{E}[f(X) \mathbf{1}\{m < X \le a\}] + \mathbb{E}[ (m-a) \mathbf{1}\{X > a\}]. $$
Now just note that $a-m$ is a constant, and that $\mathbb{E}[\mathbf{1}\{X \in E\}] = P(X \in E)$.