Here are some of the known definitions:
$$a \equiv b \pmod m$$ $$a -b =km \Rightarrow a=km+b$$
Now we also have:
$$ax = b \pmod m \Rightarrow ax+my=b$$
I'm having a little trouble relating all of this because if we take for example: $3x \equiv 7\pmod 4$ and if we use : $a -b =km $, shouldn't we have: $3x-4k=7$ for some integer $k$ ? I'm trying to see how $ax+my=b$ comes to be...