<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] Wolfram answer:
$y = 2c + 1$
$x = c + 3d + 2$
</s>