Given $2x \equiv 3 \pmod 5$ then
$2x \equiv 3 \pmod 5$
$3(2x) \equiv 3(3) \pmod 5$, which somehow changes to
$x \equiv 9 \pmod 5$
and finally even more confusing is its reduction to
$$x \equiv 4 \pmod 5$$
4??? What happened to the $9$ and $3$?
We are solving these as an equivlance relation
equivalnece realtion defined as it partitions ℤ into equivalence classes where [] denotes the equivalence class that contains integer .
Note
$$\begin{equation}\begin{aligned} 3(2x) \equiv 3(3) \pmod 5 \\ 6x \equiv 9 \pmod 5 \\ x + 5x \equiv 9 \pmod 5 \\ x \equiv 9 \pmod 5 \end{aligned}\end{equation}\tag{1}\label{eq1A}$$
This is because $5x \equiv 0 \pmod 5$. Similarly, you have
$$\begin{equation}\begin{aligned} x \equiv 9 \pmod 5 \\ x \equiv 5 + 4 \pmod 5 \\ x \equiv 4 \pmod 5 \end{aligned}\end{equation}\tag{2}\label{eq2A}$$
since $5 \equiv 0 \pmod 5$. Note, in general, $a \equiv b \pmod c \iff a - b \equiv 0 \pmod c$, i.e., $a - b = kc$ for some integer $k$. For \eqref{eq1A}, you have $5x \equiv 0 \pmod 5$ since $5x - 0 = (x)5$, and for \eqref{eq2A}, you have $5 - 0 = (1)5$.
Considering the equivalence class of $[4]$ modulo $5$, note all values, $b$, in this equivalence class are such that $b \equiv 4 \pmod 5 \iff b = 5k + 4$ for some integer $k$. In your specific case, you get $b = 9$ where $k = 1$ since $9 = 5(1) + 4$. In general, $[4] = \{\ldots, -11, -6, -1, 4, 9, 14, \ldots\}$ as $k$ goes through the integers from negative infinity to positive infinity.