Given: 
pth term of an AP = q 
qth term = p 
Prove:
nth term of A.P. is (p+q-n). 
Proof:
We know that, 
nth term of an AP (an) = a + (n - 1)d 
Hence, 
⟹ a + (p - 1)d = q 
⟹ a + pd - d = q 
⟹ a = q - pd + d -- equation (1) 
Similarly, 
⟹ a + (q - 1)d = p 
Substitute the value of a from equation (1). 
⟹ q - pd + d + qd - d = p 
⟹ qd - pd = p - q 
⟹ - d(p - q) = p - q 
⟹ - d = 1 
⟹ d = - 1 
Substitute the value of d in equation (1). 
⟹ a = q - p( - 1) + ( - 1) 
⟹ a = q + p - 1 
Now, 
an = q + p - 1 + (n - 1)( - 1) 
⟹ an = q + p - 1 - n + 1 
⟹ an = p + q - n 
Hence, Proved.
I hope it will help you.
Regards.