Suppose $198 \mid 5x$. Show that $198 \mid x$.
Euclid's Lemma says that if $a \mid (bc)$ with $\gcd (a, b) = 1$ then $a \mid c$.
Here $\gcd(198,5)=1$ so by Euclid's Lemma $198 \mid x$.
Another way to look at this is that 5 is prime and only has factors 1 and 5. Therefore 198 can't be a factor of 5, so must be a factor of $x$.