The problem here is that A, B could take on infinite values
For example A =180 B = 45
Tan A = 0 Tan B = 1
So ( 1 + Tan A) (1 + Tan B) = ( 1 + 0) (1 + 1) = 2
However
A = 270 B = - 45
Tan A = undefined....so (1 + Tan A) (1 + Tan B) is also undefined
I'm assuming that the first situation might be what is intended