Algorithm for solving system of congruences
It is often less confusing to refrain from using congruences and simply write what it means in extension. I.e. when the textbook says to take an $x$ which is equal modulo $M$ to $r_0\cdot w_0 + \dots + r_{n-1}\cdot w_{n-1}$, it means that any $x$ of the form $x=r_0\cdot w_0 + \dots + r_{n-1}\cdot w_{n-1} + k\dot M$, with $k\in \mathbb{Z}$, is a solution. Under this form it should be clearer that $x$ is indeed a solution since $\forall i\in \mathbb{N}_n,x\equiv_{(m_i)}r_i\cdot w_i + \sum_{j\neq i}r_j\cdot w_j+ k\cdot M\equiv_{(m_i)}r_i$ (as $m_i|M$, $w_i\equiv_{(m_i)}1$, and for $j\neq i$ $m_i|w_j$).