As has been pointed out in comments, from $x\equiv a\pmod{m}$ and $x\equiv a \pmod{n}$ we cannot conclude that $n$ divides $m$.
It is not necessarily true that if $n$ divides $m$ then $[a]_n\subseteq [a]_m$.
For example, let $n=2$, $m=4$, and $a=0$. Then $[a]_n$ consists of all multiples of $2$, and $[a]_m$ consists of all multiples of $4$. Certainly it is not the case
that $[a]_n\subseteq [a]_m$. But it is true that $[a]_m\subseteq [a]_n$. When the proposed result is corrected, we can prove it using the intuition that you had.
Suppose first that $n$ divides $m$. Then if $x\equiv a\pmod{m}$, we can conclude that $x\equiv a \pmod{n}$. For if $m$ divides $x-a$ and $n$ divides $m$, then $n$ divides $x-a$. Thus $[a]_m\subseteq [a]_n$. (Note the direction of the containment.)
For the other direction, suppose that $[a]_m \subseteq [a]_n$. We show that $n$ divides $m$.
So we are told that for every $x$ such that $m$ divides $x-a$, we have that $n$ divides $x-a$. Let $x=a+m$. Then $m$ divides $x-a=m$. We conclude that $n$ divides $x-a$, meaning that $n$ divides $m$.