$$9x+27y \equiv 3\pmod {102}$$ $$16x+4y \equiv 2\pmod {102}$$
Here's what I did. I subtracted the first equation from the second to get
$$9x+27y \equiv 3\pmod {102}$$ $$7x-23y \equiv -1\pmod {102}$$
After that, I multiplied the first equation by $7$. Next, I added to it the second equation multiplied by $-9$ to eliminate $x$ from the first equation:
$$I = II \cdot -9 + I$$
The first equation now looks like this:
$$396y \equiv 30 \pmod {102}$$
I checked the solutions online, and this congruence has six solutions less than $m$ which are: $y=6,23,40,57,74,91$
For example. let's take $y=6$ for now. If I plug it in the second equation $16x+4y \equiv 2 (\mod 102)$, I get the congruence:
$$16x \equiv 80 \pmod {102}$$
The solutions of which are $x=5$, $x=56$.
Now, for $y=6$ we have $x=5$ and $x=56$.
The problem: I tried to test $x=5, y=6$ and it satisfies both of the starting linear congruences. However, $x=56, y=6$ satisfies only the second congruence.
What do I do now? I calculated all solutions and it came out that the $y=6, y=57$ share the same values for x. Same goes for $y=23, y=74$ and $y=40, y=91$. I doubt I made a mistake, so does it mean I only discard the solutions which don't satisfy both congruences?
Thanks!
$\begin{cases}9x+27y-3=102 k\\16x+4y-2=102m\end{cases}$
Which gives:
$x=\frac{17(27m-4k)+7}{66}\Rightarrow 66x\equiv 7\bmod 17$
$66\equiv 15\equiv -2 \bmod 17$
$\Rightarrow -2x\equiv 7\bmod 17\rightarrow 2x\equiv -7\equiv 10 \bmod 17$
$\Rightarrow x\equiv 5\bmod 17$
$y=\frac{17(16k-9m)+5}{66}$
$66y\equiv 5\bmod 17$
which finally gives :
$y\equiv 6\bmod 17$