<s>[INST] Solve the congruence $6x+15y \equiv 9 \pmod {18}$ Solve the congruence $6x+15y \equiv 9\pmod {18}$
Approach:
$(6,18)=6$, so $$15y \equiv 9\pmod 6$$
$$15y \equiv 3\pmod 6$$
So the equation will have $(15,6)$ solutions. Now we divide by 3
$$5y \equiv 1\pmod 2$$. 
Solving the Diophantine equation we get $y \equiv1\pmod 2 $, so $y=1+2m$
$$6x \equiv 9-15y\pmod {18}$$
$$6x \equiv 9-15(1+2m)\pmod {18}$$
$$6x \equiv -6-30m\pmod {18}$$
Divide by 6
$$x \equiv -1-5m\pmod 3$$
The right solution is $x-m \equiv 2\pmod 3$. I have $x+5m \equiv 2\pmod 3$
$$x-m+6m \equiv 2\pmod 3$$ $$x-m \equiv 2\pmod 3$$
Wolfram alpha says $y=1+2t$ and $x=t+3d+2$
 [/INST] I hope my answer is okay.
$6x+15y \equiv 9(mod 18)$
$=> 2x+5y \equiv 3(mod 6)$ 
$=> 2x-y \equiv 3(mod 6)$
i.e $2x-y-3 \equiv 0(mod 2)$ and $\equiv 0(mod 3)$
this means $y+1 \equiv 0(mod 2)$ and $x+y \equiv 0(mod 3)$
Write $y=2p+1$ and so $x-p +1 \equiv 0(mod 3)$
Then use parametric equations.
</s>