# Proving Chinese number theorem problem

Assume the following

$$q \equiv m \pmod{x} \\ q \equiv n \pmod{y}$$

Show the following where $q$ doesnt go to $(m,n)$

$$q = (my(y^{-1} \bmod{x}) + nx(x^{-1} \bmod{y})\bmod{xy}$$

Breaking it down even further: $$Cx = y(y^{-1} \bmod{x}) \\ Cy = x(x^{-1} \bmod{y})$$

So I think they are using Chinese number theorem to solve this but I dont really know how to start it. I used that theorem when $q$ goes to $(m,n)$ but apperntly there is another way

-
This is the same question you asked yesterday. Please don't ask duplicate questions. Either edit you prior question to say more precisely what you need help with and/or ask for elaboration on the prior answers. –  Bill Dubuque Feb 18 at 21:49