Solving $9x \equiv 21 \bmod 30$ 
Solving $9x \equiv 21 \bmod 30$

My approach:
Finding $gcd(9,30)$:
\begin{align}
30 &= 9 \cdot 3 + 3 \\ 9 &= 3 \cdot 3 + 0 
\end{align}
So $gcd(9,30)=3$ and since $3 \mid 21$ so the congruence has $3$ incongruent solutions. Express $3$ as a linear combination of $9$ and $30$, we get: $$3 = 30-9 \cdot 3 \ \ \ \ \ \ (1)$$
We have to solve this equation to find $x_0$:
$$9x-30y=21 \ \ \ \ \ \ (2)$$
Multiplying $(1)$ by $7$ we get:
$$21=30 \cdot7-9 \cdot 21$$
Rewritten in form of $(2)$:
$$-9 \cdot (21) + 30 \cdot (7) = 21 $$
So $x_0=21$, the incongruent solutions are:
$$21 + 10n, \ \ \ \ \ n = 0,1,2$$
Then $x=21,31,41$. But my answer is wrong, the answer is: $x=9,19,29$. Can you tell me which step is wrong. Thanks for your help!

if $9x = 21 + 30 t,$   we see that $3x = 7 + 10 t,$  the reverse also holding. Solve
$$   3x \equiv 7 \pmod {10}  $$
for which you need a reciprocal of $3.$  Since $21 \equiv 1 \pmod {10} $ we see that
$$  \frac{1}{3} \equiv 7 \pmod {10} ,  $$
and.......
