Problem:
If the sum of the first $p$ terms of an arithmetic progression is $q$ and the sum of the first $q$ terms is $p$, then find the sum of $p+q$ terms.
For the problem we can write (considering $a$ is the first term and $d$ is the common difference):
$$\frac{p}{2}\cdot \biggl[2a + (p-1)d \biggr] = q \qquad \cdots (1)$$
$$\frac{q}{2}\cdot \biggl[2a + (q-1)d \biggr] = p \qquad \cdots (2)$$
Now in my module it is given that from these we can write $\displaystyle d= \frac{-2(p+q)}{pq}$; I am not getting how we can get that value of $d$ ?!