I'm not sure I get some parts of the modulo function. I'll run through what I did in the first part and then go through what I don't get about the second.
Okay, so for the first part I put that xmoda = (x+k)moda, where k is any multiple of a. Later, we get N1 + N2 = a(m1 + m2) + n1 + n2.
Therefore, if we put N1 + N2 into the modulo function under a, we get the same function as if we put n1 + n2. This worked for N1N2 as well.