I am quite confused about specific equality that is used when solving linear congruences. In the example provided, it is the jump from the second to last equation to the final equation. I cannot seem to find any theorem or even reasoning as to why this works. I am trying to use the method of solving for the inverse, then using this inverse to find the answer.
For example, to solve
$3x \equiv 4$ $($$\mod 7$$)$
first, we can find the inverse of $3$ modulus $7$. This inverse is equal to $-2$.
Therefore, we can multiply both sides by $-2$, getting $(-2) \cdot3x \equiv (-2)\cdot4$ $($$\mod 7$$)$, or
$-6x \equiv -8$ $($$\mod 7$$)$
This is where I am confused. I don't understand why this allows us to say that since
$-6x \equiv -8$ $($$\mod 7$$)$,
$x \equiv -8$ $($$\mod 7$$)$
I have been looking through every proof I could find and I cannot figure why this second to last step implies the final step.