first off let's observer that both angles are in the range of π/2 and π, that's the same as saying both angles A and B are in the II Quadrant, mind you that on the II Quadrant the values of "x" and thus cosine is negative and the value of "y" and thus the sine is positive, yielding the tangent negative, as we can see for the tangent of angle B.
Let's find the tangent of angle A.
now, let's check what tan(A - B) is