RHS,
p+q1−pq=tan(A+B)+tan(A−B)1−tan(A+B).tan(A−B)
=tanA+tanB1−tanA.tanB+tanA−tanB1+tanA.tanB1−tanA+tanB1−tanA.tanB.tanA−tanB1+tanA.tanB
=(tanA+tanB)(1+tanA.tanB)+(tanA−tanB)(1−tanA.tanB)(1+tanA.tanB)(1−tanA.tanB)(1+tanA.tanB)+(tanA+tanB).(tanA−tanB)(1−tanA.tanB)(1+tanA.tanB)
=tanA+tanB+tan2A.tanB+tanA.tan2B+tanA−tanB−tan2A.tanB+tanA.tan2B1−tan2A.tan2B−tan2A+tan2B
=2tanA+2tanA.tan2B(1−tan2A)(1+tan2B)=2tanA(1+tan2B)(1−tan2A)(1+tan2B)=2tanA1−tan2A=tan2A=LHS
Hence proved.