Question: If $x, y$ are coprime, then for any integer $a,b$ there is an integer $m$ such that:

$m \equiv a \;(\bmod\; x)$

$m \equiv b \;(\bmod\; y)$

I approached it like this:

Since they are coprime then 

> 
> $xi + yj = 1$
> 
> 
> 

Then

$1 - yj = xi \;\text{ and } \; 1 - xi = yj $

Then 

$1 \equiv yj \;(\bmod\; x) \;\text{ and } \;1 \equiv xi \;(\bmod\; y)$

But unfortunately I am not sure if this approach is correct. Can someone hint me?

Answer: 
Assume for exemple $AB=I$.
Then $A$ and $B$ represent two linear maps $f$ and $g : \mathbb{R}^n \to \mathbb{R}^n$, $n$ is the size of the matrix.
Then you have $f\circ g= id$, which implies easily that $f$ is surjective and $g$ is injective (1). But in finite dimensional linear algebra, those facts are equivalent $f$ and $g$ to be bijective (2), and you are done with the book's proof...

(1) and (2) are exercises, if you have a problem with you can ask, but it's probably solved somewhere in your book.
We assume that $AB = I$ and we want to prove that $BA$ will be $I$ as well. I'll prove by contradiction.

Let's assume that $AB = I$, but $BA = C \neq I$(a $C$ which is not the identity matrix). Then left-multiplying both sides by $A$ it gives $A(BA) = A(C)\,\,\, != A(I)$. Also since matrix multiplication is associative we can say $(AB)A = AC \,\,\, != A$. Now, according to our initial assumption, $AB = I$, so we can say $IA = AC \,\,\, != A$, but it is $A\,\,\, != A$ which is a contradiction, so the $C$ must be $I$.