The question: Alice chooses two large primes $p$ and $q$ and she publishes $N=pq$. It is assumed that $N$ is hard to factor. Alice also chooses three random numbers $g$, $r_1$, and $r_2$ modulo $N$ and computes $$g_1 \equiv g^{r_1(p-1)} \mod N \quad \text{and} \quad g_2 \equiv g^{r_2(q-1)} \mod N$$ Her public key is the triple $(N, g_1, g_2)$ and her private key is the pair of primes $(p, q)$. Now Bob wants to send the message $m$ to Alice, where $m$ is a number modulo $N$. He chooses two random integers $s_1$ and $s_2$ modula $N$ and computes $$c_1 \equiv mg_1^{s_1} \mod N \quad \text{and} \quad c_2 \equiv mg_2^{s_2} \mod N$$ Bob sends the ciphertext $(c_1, c_2)$ to Alice. Decryption is extremely fast and easy. Alice uses the Chinese remainder theorem to solve the pair of congruences $$x \equiv c_1 \mod p \quad \text{and} \quad x \equiv c_2 \mod q$$ (a) Prove that Alice's solution $x$ is equal to Bob's plaintext $m$. (b) explain why this cryptosystem is not secure.
My attempt: Since we wish to prove $x = m$, try starting by solving for $x$. Using the Chinese remainder theorem, $$x \equiv p^{-1}(c_2-c_1)(\mod q)$$ Thus we wish to demonstrate that $$m \equiv p^{-1}(c_2-c_1)(\mod q)$$ So I attempted $$m \equiv p^{-1}(mg_2^{s_2}( \mod N) - mg_1^{s_1}( \mod N))( \mod q)$$ $$m = mp^{-1}(g_2^{s_2} - mg_1^{s_1}( \mod N)) ( \mod q)$$ But I don't know where to go from here.