(a_p=q=ar^{p-1}), (a_q=p=ar^{q-1})
[ a_{p+q}=ar^{p+q-1} ]
From the two equations: [ \dfrac{q}{p}=r^{p-q}\implies r=\left(\dfrac{q}{p}\right)^{\frac{1}{p-q}} ]
Then one obtains [ a_{p+q}=(q^p\cdot p^q)^{\frac{1}{p-q}} ] (as required; careful algebra with powers of (a) and (r)).
Proved.