I have a proof that relates to the Chinese remainder theorem, but I am completely lost as to how to proof it. I do not know what method of proof to use or where to start. This is the question: Consider the system of congruences: $\begin{cases} x \equiv a_1 \pmod {m_1}\\ x \equiv a_2 \pmod {m_2} \end{cases}$ where $m_1$ and $m_2$ are relatively prime. Let $b_1$ and $b_2$ be integers where $b_1$ is the inverse of $m_1$ modulo $m_2$ and $b_2$ is the inverse of $m_2$ modulo $m_1$. Let $x_0= m_1 b_1a_2 + m_2b_2a_1$.
I have to prove that $x_0$ is a solution to the system of congruences.