First, the intuition for this result is that if $x_n$ is close to $x$, then for large $n$, the expression $\frac{x_1+\cdots x_n}{n}$, consists in the numerator mostly of elements very close to $x$, so that the numerator is approximated by $const + (n-k)x$, which cancels with the denominator to give $x$. This intuition can be turned into a rigorous proof, as follows.
Proof sketch: Let $\epsilon >0$ be given. Then there is some $n_0$ such that for all $n>n_0$ holds that $|a_n-x|<\epsilon/2$. For every $m>n_0$, split the sum $a_n$ as $b_n+c_n$, where $b_n=\frac{x_1+\cdots x_{n_0}}{n}$ and $c_n=\frac{x_{n_0+1}+\cdots x_{m}}{n}$. Now
Argue why you don't care about what happens for $m\le n_0$.
Use the fact that the numerator in $b_n$ is constant to show that there is some $n_1$ such that for all $n>n_1$ holds that $|b_n|<\epsilon/2$.
Use the choice of $n_0$ to evaluate $|c_n-x|$.
Wrap things up to conclude the result.