Hint $\quad\begin{eqnarray}\rm\ mod\ m_1\!:\ \ x_0 &=&\:\rm m_1 b_1 a_2 + m_2 b_2 a_1 \\ &\equiv&\rm\ 0\cdot b_1 a_2 + \ \ 1\ \cdot\:\ a_1\: \equiv\: \ldots\ \ \end{eqnarray} $ by $\rm\ m_1\equiv 0,\ \:m_2b_2\equiv 1$.
Key is: $\rm\:mod\ (m_1,m_2)\!:\:\ m_1 b_1 \equiv (0,1),\ \ m_2 b_2\equiv (1,0),\:$ and these vectors span since
$$\rm (a_1,a_2)\ =\ a_1\:(1,0)\: +\: a_2\:(0,1)$$
The innate algebraic structure will be clearer when you study the Peirce direct sum decomposition induced by (orthogonal) idempotents.
$\begin{eqnarray}&&x\equiv\ \ 7\equiv \color{#c00}{16}\pmod 9\\ &&x\equiv\ \ 4\equiv \color{#c00}{16}\pmod {12}\\ &&x\equiv 16\equiv \color{#c00}{16}\pmod{21}\end{eqnarray}$ $\iff$ $\,9,12,21\mid x\!-\!\color{#c00}{16}$ $\iff$ ${\rm lcm}(9,12,21)\mid x\!-\!\color{#c00}{16}$
Finally $\ {\rm lcm}(9,12,21) = {\rm lcm}(3^{\large\color{#0a0} 2},\,3\cdot 2^{\large \color{#0a0}2},\,3\cdot 7) = 3^{\large\color{#0a0}2}\cdot 2^{\large\color{#0a0}2}\cdot 7 = 252.$
Alternatively, algorithmically, by the third congruence $\ x = 16+21n\,$ for an integer $\,n.\,$ Hence
${\rm mod}\ 12\!:\ 4\equiv x= 16+21n\equiv 4-3n\iff 3n\equiv 0\iff 12\mid 3n\iff 4\mid n\iff\ n = 4k$
${\rm mod}\,\ \ 9\!:\,\ 7 \equiv x = 16+84k\equiv 7+3k\ \iff 3k\equiv 0\iff\,\ 9\mid3k\,\iff 3\mid k\,\iff\, k = 3j$
We've proved $\ x = 16+84(3j) = 16+252j.$
Remark $\ $ Note, in particular, that there is no need to split into pairwise coprime moduli as in David's answer. Generally, proceeding as above will yield a simpler method - often much so.
Best Answer
Well every number is equivalent to itself mod any modulus.
So $a\equiv a \mod mn$ and $a \equiv a \mod m$ and $a \equiv a \mod n$. So $x = a \mod mn$ is one solution.
But the Chinese remainder theorem claims that the solution is unique $\mod mn$.
So $x \equiv a \mod mn$ is the solution.
=====
What you were trying to do was
$M = mn$
and $n'*n \equiv 1 \mod m$ and $m'*m \equiv 1 \mod n$
So $x \equiv an'n + am'n \equiv a(n'n + m'm) \mod mn$.
Which shunts the question to what is $(n'n + m'm) \mod mn$.
$n'n + m'm \equiv 1 \mod n$ and $n'n + m'm \equiv 1 \mod m$ so $(n'n + m'm) = 1 + kn = 1 + jm$ (for some integers $j,k$) so $kn = jm $ but $n$ and $m$ are relatively prime. So $n|j$ and $k|m$ and $kn = jm = lnm$ (for some integer $l$) and $(n'n + m'm) = 1 + lmn \equiv 1 \mod mn$.