In some sense, in your proof, you are assuming what you are trying to prove.
When showing a basic property like the transitivity of a congruence relation, it's important to keep in mind what you already "know".
For example: It seems obvious that $a \equiv b$ (mod $m$) implies that $b \equiv a$ (mod $m$). But at the very beginning, we shouldn't assume this (until it's proven).
To prove something like this you need to either use propositions/theorems you've already established or go back to the definition.
For a homework problem like this I imagine you don't really have any theorems about congruences to work with. This means you're stuck going back to the definition.
Question: How did you define congruences? There are many equivalent ways.
Let's say you defined $a \equiv b$ (mod $m$) to mean there is some integer $k$ such that $a=b+km$. If so we can use what we know about integer arithmetic to rewrite this as: $b=a-km$. Notice that $-k$ is also an integer (since $k$ is) so $b$ and $a$ differ by an integer and we've established that $b \equiv a$ (mod $m$).
Now back to your problem...
Assume $a \equiv b$ (mod $m$) and $b \equiv c$ (mod $m$). So, for example, there exists some $k$ such that $a=b+km$. We can say something about $b$ and $c$ as well. Then combine these two facts and get $a = c + ???m$, make sure ??? is an integer and we'll have established that $a \equiv c$ (mod $m$). Done! :)