Let A be the first term and D be the common difference of the A.P. . It is given that tp=a⇒A+(p−1)D=a.....(i) tq=b⇒A+(q−1)D=b....(ii)
Subtracting Eq. (ii) from Eq. (i), we get (p−1−q+1)D=a−b ⇒D=p−qa−b....(iii)
Adding Eqs. (i) and (ii), we get 2A+(p+q−2)D=a+b ⇒2A+(p+q−1)D=a+b+D ⇒2A+(p+q−1)D=a+b+p−qa−b.....(iv)
Now, Sp+q=2p+q[2A+(p+q−1)D] =2p+q[a+b+p−qa−b] [using Eq. (iv)]