Let's derive it. We know that
#sin(A+B) = sin(A)cos(B) + sin(B)cos(A)#
#cos(A+B) = cos(A)cos(B) - sin(A)sin(B)#
#tan(A+B) = (sin(A+B))/(cos(A+B))#
#=(sin(A)cos(B) + sin(B)cos(A))/(cos(A)cos(B) - sin(A)sin(B))#
Take #cos(A)cos(B)# out of denominator as common factor:
#=(sin(A)cos(B) + sin(B)cos(A))/(cos(A)cos(B)(1 - tan(A)tan(B)))#
We can split this up into two separate terms by splitting up the numerator. This means we can cancel out the cosines on the numerator.
#=(sin(A)cancel(cos(B)))/(cos(A)cancel(cos(B))(1 - tan(A)tan(B))#
# + (sin(B)cancel(cos(A)))/(cancel(cos(A))cos(B)(1 - tan(A)tan(B))#
Because #tanphi = (sinphi)/(cosphi)# this leaves:
#(tan(A))/(1 - tan(A)tan(B)) + (tan(B))/(1 - tan(A)tan(B))#
Add together again to obtain
#tan(A+B) = (tan(A) + tan(B))/(1 - tan(A)tan(B))#