question on remainders in numbers theory 
Let $p, q$ be primes and $a, b$ be integers. If $pa$ is divided by $q$, then the remainder is 1. If $qb$ is divided by $p$, then also the remainder is 1. What is the remainder when $pa + qb$ is divided by $pq$?

I tried this question but could get nowhere. I got the answer by using an example, but I am looking for a generalized proof.
 A: The first condition means that $q \mid (pa - 1)$. Likewise the second means $p \mid (qb - 1)$. If we multiply these two, we have $pq \mid (pa - 1)(qb - 1) = pqab - (pa + qb) + 1$. Obviously, $pq \mid pqab$, so $pq$ must divide $-(pa + qb) + 1$. This means that the remainder is $1$
For example $p = 3$, $q = 5$, $pa = 21$, $qb = 25$. Then $pa + qb = 46$ which has a remainder of $1$ when didvde by $pq = 15$.
A: Write $x = pa + qb$. Note that $x \equiv qb \equiv 1$ (mod $p$) and $x \equiv pa \equiv 1$ (mod $q$). 
Since $x \equiv 1$ (mod $p$) we can write $x = kp + 1$ for some integer $k$. Plug this into the second equivalence to get 
$$kp + 1 \equiv 1 \mod q$$
Therefore $kp \equiv 0$ (mod $q$). In other words $q|kp$. Since $q,p$ are prime this must mean $q|k$ i.e. $k = nq$ for some $n$.
Putting this back into our previous form for $x$ gives $x = kp + 1 = npq + 1$, so that $x \equiv 1$ (mod $pq$). So the remainder is $1$.
A: ${\rm mod}\ p\!:\,\ p\equiv0,\ qb\equiv 1\,\Rightarrow\, pa+qb\equiv 0+1\equiv 1$
${\rm mod}\ q\!:\,\ q\equiv 0,\ pa\equiv 1\,\Rightarrow\, pa+qb\equiv 1+0\equiv 1$
So $\ p,q\mid pa+qb-1\,\Rightarrow\, {\rm lcm}(p,q)=pq\mid ap+bq-1\,\Rightarrow\, ap+bq\equiv 1\pmod{\!pq}$
Remark $\ $ i.e. $\ {\rm mod}\ (p,q)\!:\ \begin{align}pa\equiv (0,1)\\ qb\equiv (1,0)\end{align}\,\Rightarrow\, pa+qb\equiv (0,1)+(1,0) = (1,1)$  
This view is clarified when one learns the ring-theoretic form of CRT.
