I'm going over some past papers and have been able to show that if $p$, $q$ are distinct odd primes and $\gcd (a, pq)=1$ then $a^{\operatorname{lcm}(p-1,q-1)} \equiv 1 \pmod {pq}$
the next part says taking $g$ to be a primitive root $\mod p$ and $h$ a primitive root $\pmod q$, apply the Chinese Remainder Theorem to specify an integer a whose order $\pmod {pq}$ is exactly $\operatorname{lcm}(p-1,q-1)$ but I'm not sure how to do this.
So far I've written out this but don't see how to solve
$g^{p-1} \equiv 1 \pmod p$
$h^{q-1} \equiv 1 \pmod q$
$a^{\operatorname{lcm}(p-1,q-1)} \equiv 1 \pmod p$
$a^{\operatorname{lcm}(p-1,q-1)} \equiv 1 \pmod q$
$a=g^kh^l$