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$
Dividing everything by $3$, including the modulus, we get the equivalent congruence
$$2x+5y\equiv 3\pmod{6}.$$
It is convenient to rewrite this as $2x-y\equiv 3\pmod{6}$, or equivalently $y\equiv 2x-3\equiv 2x+3\pmod{6}$. 

Now we have a parametric solution: $x\equiv t\pmod{6}$, $y\equiv 2t+3\pmod{6}$. To write it out at length, set $t=0,1,2,3,4,5$. The first two solutions are then $x\equiv 0\pmod{6}$, $y\equiv 3\pmod{6}$ and $x\equiv 1\pmod{6}$, $y\equiv 5\pmod{6}$. Four more to go.
Wolfram answer:
$y = 2c + 1$
$x = c + 3d + 2$