Since $X \in [a, b]$ almost surely, result
R4778: Stieltjes integral calculus expression for probability that a bounded random real number takes value on the bounding interval shows that $\int^b_a \, d F(x) = 1$. Thus, we have
\begin{equation}
\mathbb{E} X
= \int^b_a x \, d F(x)
\leq b \int^b_a \, d F(x)
= b
\end{equation}
and
\begin{equation}
\mathbb{E} X
= \int^b_a x \, d F(x)
\geq a \int^b_a \, d F(x)
= a
\end{equation}
This is what was required to be shown. $\square$