I did this
Apparently this is wrong because the right answer is $17+43t$ for $0 \le t \le 18$. What went wrong? I know this is supposed to have 19 solutions but what I got was $-198 \pmod {817} + 43t$ and -198 mod 817 isn't 17.
I did this
Apparently this is wrong because the right answer is $17+43t$ for $0 \le t \le 18$. What went wrong? I know this is supposed to have 19 solutions but what I got was $-198 \pmod {817} + 43t$ and -198 mod 817 isn't 17.
Nothing really went wrong.
You got $589(-198+43t)\equiv209\bmod817$.
By the mod distribution law, this is equivalent $(\div19)$ to $31(-198+43t)\equiv11\bmod43$.
So $x\equiv-198 \equiv17\bmod43$.
So $x\equiv17+43t\bmod 817$.
You could have noted from the beginning that $589, 209, $ and $817$ are all multiples of $19$, so
$589x \equiv 209 \pmod {817}\iff31x\equiv11\pmod{43}.$
This can be solved using the Bezout identity $13\times43-18\times31=1$:
$x\equiv-18\times11=-198\equiv17\pmod{43}$,
so $x\equiv 17, 60, 103, 146, 189, 232, 275, 318, 361, 404, 447, 490, 533, 576, 619, 662, 705, 748, $
or $791\bmod 817$.
Your solution is correct since $\bmod 43\!:\ x \equiv -198 \equiv 5(43)-198\equiv \,\bbox[5px,border:1px solid #c00]{\!\!17}$
An easier way (fractional extended Euclidean algorithm), first calculating $\,\gcd(817,589)\!=\!\color{#c00}{19}\,$ in parallel, and second assuming the gcd known & cancelling it out, working $\bmod 43 = {817}/\color{#c00}{19}$.
${\rm mod}\,\ 817\!:\,\ \dfrac{0}{817}\overset{\large\frown}\equiv \dfrac{209}{589}\overset{\large\frown}\equiv \color{90f}{\dfrac{-209}{228}}\overset{\large\frown}\equiv \color{#90f}{\dfrac{19}{-95}}\overset{\large\frown}\equiv \color{#0a0}{\dfrac{-171}{38}}\overset{\large\frown}\equiv \color{#c00}{\dfrac{-323}{-19}}\overset{\large\frown}\equiv \dfrac{0}0$
${\rm mod}\ \ \,43\!:\ \ \ \ \dfrac{0}{43}\,\overset{\large\frown}\equiv\ \dfrac{11}{31}\ \overset{\large\frown}\equiv\ \color{90f}{\dfrac{-11}{12}}\ \overset{\large\frown}\equiv\ \color{#90f}{\dfrac{1}{-5}}\ \overset{\large\frown}\equiv\ \ \color{#0a0}{\dfrac{-9}{2}}\ \,\overset{\large\frown}\equiv\ \color{#c00}{\dfrac{-17}{-1}}\, \overset{\large\frown}\equiv\ \dfrac{0}0$
$\begin{array}{rl} \qquad\ {\rm i.e.}\ \ \ \ \bmod 43\!:\qquad\ [\![1]\!] &\ 43\, x\,\equiv\ \ \ 0\ \\ [\![2]\!] &\ \color{c00}{31\,x\, \equiv\ \ \ 11}\!\!\!\\ [\![1]\!]\:\!-\:\!1\,[\![2]\!] \rightarrow [\![3]\!] &\ \color{90f}{12\,x\, \equiv {-}11}\ \\ [\![2]\!]\:\!-\:\!\color{1orange}3\,[\![3]\!] \rightarrow [\![4]\!] & \color{#90f}{{-}5\,x\, \equiv\ \ \ 1}\ \\ [\![3]\!]\:\!+\:\!\color{}2\,[\![4]\!] \rightarrow [\![5]\!] &\:\! \ \ \, \color{#0a0}{2\,x\, \equiv {-}9}\ \\ [\![4]\!]\:\!+\:\!\color{1orange}2\,[\![5]\!] \rightarrow [\![6]\!] & \color{#c00}{{-}1\,x\, \equiv {-}17}\ \\ [\![5]\!]\:\!+\:\!\color{1orange}2\,[\![6]\!] \rightarrow [\![7]\!] & \ \ \: \color{90f}{0\,x\, \equiv\ \ \ 0}\ \end{array}$
$\begin{align}{\rm Therefore}\ \ \ x\equiv {\color{#c00}{\dfrac{-323}{-19}}\!\!\!\pmod{817}}&\equiv \,\color{#c00}{17}\!\!\!\pmod{\!43},\ \ {\rm by\ cancelling}\ \ 19\\ &\equiv\, 17+43\,k\!\!\pmod{\!817},\ \ 0\le k < 19\\[0.5em] &\equiv \{17,\, 60,\, 103,\ldots, 705,748,791\}\!\!\pmod{\!817}\end{align} $
Remark $ $ Normally the equations under the fractions are omitted after one masters the algorithm, but I include them since they are instructive when learning it. Notice the fractions in the $\bmod 817\,$ Euclidean sequence are the scalings by $19$ of those in the $\!\bmod 43$ sequence: $\,a/b\to (19a)/(19b)$.