Let a and d be the first term and the common difference of the AP. We have
Tp=a+(p−1)d=q ...... (i)
Tq=a+(q−1)d=p ...... (ii)
By, (i) - (ii), we have
Tp−Tq=(p−q)d=q−p
⇒d=−1
Using this value in (i) gives
a=p+q−1
Now, the nth term is
Tn=a+(n−1)d
=(p+q−1)+(n−1)(−1)
=p+q−n