$$ \begin{cases} m=&a_1x+ b_1y \\ n =& a_2x + b_2y \end{cases} \qquad\text{and}\qquad a_1 b_2 - a_2 b_1 = 1 $$
I tried to substitute the value of $x$ in eq-1 to eq-2 and got $na_1+ma_2=y$
source: Challenges and Thrills Of Pre-College Mathematics (Exercise 2.2 Q-20)