# Simple modular arithmetic question

Can someone please give a clear explanation on how from
$(41)(59)x\equiv x\pmod {78}$ and
$(41)(59)x\equiv 123\pmod {78}$
we get $x\equiv 123\pmod {78}$?

Note that $41 \times 59 = 2419 \equiv 1 \pmod{78}$. Hence, we have $$41 \times 59 \times x \pmod{78} \equiv (78k+1)x \pmod{78} \equiv x \pmod{78}$$ By the same arguement, we have that $$41 \times 59 \times x \equiv 123 \pmod{78} \implies x\equiv 123 \pmod{78}$$
Congruence satisfies transitivity; that is, if $a\equiv b$ and $b\equiv c$, then $a\equiv c$.