Proving the congruence $p^{q-1}+q^{p-1} \equiv 1 \pmod{pq}$

$p^{q-1}+q^{p-1}\equiv p^{q-1}\pmod q$

Now using Fermat's Little Theorem $p^{q-1}\equiv1\pmod q\implies p^{q-1}+q^{p-1}\equiv 1\pmod q$

Similarly, $p^{q-1}+q^{p-1}\equiv 1\pmod p$

As $p$ and $q$ both divides $(p^{q-1}+q^{p-1}-1),$ lcm$(p,q)$ will divide $(p^{q-1}+q^{p-1}-1)$

Now, lcm$(p,q)=p\cdot q$

Generalization:

For any two distinct integer $m,n>1$ where $(m,n)=1,$

$(1):m^{\phi(n)}+n^{\phi(m)}\equiv1\pmod {m\cdot n}$ using Euler' Totient theorem

$(2):m^{\lambda(n)}+n^{\lambda(m)}\equiv1\pmod {m\cdot n}$ using Carmichael Function


To your

$$p^{q-1} \equiv 1 \pmod q\text, \qquad q^{p-1} \equiv 1 \pmod p\text,$$

add the fact that

$$p^{q-1} \equiv 0 \pmod p\text, \qquad q^{p-1} \equiv 0 \pmod q\text.$$

Then

$$p^{q-1} + q^{p-1} \equiv 1 \pmod q\text, \qquad p^{q-1} + q^{p-1} \equiv 1 \pmod p\text,$$

and by the Chinese Remainder Theorem,

$$p^{q-1} + q^{p-1} \equiv 1 \pmod {pq}\text.$$