Question:
Solve $12x\equiv9\pmod{15}$
My try:
$\gcd(12,15)=3$ so it has at least $3$ solutions.
Now $15=12\times1+3\\ 3=15-12\times 1\\ 3=15+2\times(-1)\\ \implies9=15\times3+12\times(-3)\\ \implies12\times(-3)\equiv9\pmod{15}$
So $x\equiv-3\pmod{15}$
Am I correct?
Hint: $12x\equiv 9 \pmod{15}$ if and only if $4x\equiv 3\pmod{5}$, this is easy to verify by definition. Now, everything is co-prime to the modulus, so the problem is trivial.