What are the valid deductions of a congruence equation? So I was just sitting here, doing math, and I came over this: 
$9+16a\equiv 12 \pmod 5$
Obviously, through some simple manipulations:
$9+16a-15a-9\equiv 12-9 \pmod 5$
$a\equiv 3 $
And that is a solution I took for granted, because it makes sense, doesn't it? That $a\in \{...,-2,3,8,...\}$ makes perfect sense.
Then came this:
$9+16(15b+3)\equiv 3 \pmod {18}$
Again, doing basically the same as I did last time:
$6b\equiv 0$
BUT: $b\equiv 0$?
Obviously not, because $b$ need only be a multiple of $3$, not a multiple of $18$.
Here is my problem with all this. Why do I sometimes have to go through another step of deduction and not resort to blind algebraic manipulations? And how could I know that my solution of $a$ is complete, and that I've not done some kind of screw-up akin to the one I could have done with $b$? Are there any rules of what kind of actions kills information and which don't?
 A: When new abstract concepts prove puzzling, it often helps to unwind the definitions to reduce them to more concrete notions. So let's unwind the definition of your puzzling congruence to translate it into the simpler language of integer arithmetic to understand it more concretely.
By the definition of congruence we have
$\ 6b\equiv 0\pmod{\!18} \iff 18\mid 6b \iff  \dfrac{6b}{18} = \dfrac{b}3\in\Bbb Z \iff 3\mid b\iff  b\equiv 0\pmod{\! 3}$
More generally if $\ \gcd(a,n) = d\ $ and $\ \bar a = a/d,\ \bar n = n/d,\ $ then $\ \color{#c00}{\gcd(\bar a,\bar n) = 1}\,$ so 
$ax\equiv 0\pmod{\! n}\iff n\mid ax\iff \underbrace{\dfrac{ax}n =\dfrac{\bar ax}{\bar n}}_{\large {\rm cancel}\,\ d}\in\Bbb Z\!\!\color{#c00}{\overset{\rm Euclid\!\!}\iff} \bar n\mid x\iff x\equiv 0\pmod{\!\bar n}$
A: You can use the properties of congruences: since $16\equiv 1\pmod{5}$, also $16a\equiv a\pmod{5}$. Thus you have
$$
9+a\equiv 12\pmod{5}
$$
that becomes
$$
a\equiv 3\pmod{5}
$$
Note that all steps are “reversible”, so you're sure that this is the only solution:
\begin{gather}
a\equiv3\pmod{5}\\[6px]
a+9\equiv3+9\pmod{5}\\[6px]
15a+a+9\equiv12\pmod{5}
\end{gather}
Let's tackle the other one:
\begin{gather}
9+16(15b+3)\equiv 3 \pmod {18} \\[6px]
9-2(-3b+3)\equiv 3\pmod{18} \\[6px]
9+6b-6\equiv 3\pmod{18} \\[6px]
6b\equiv0\pmod{18}
\end{gather}
This last congruence is equivalent to
$$
b\equiv0\pmod{3}
$$
not to $b\equiv0\pmod{18}$.
