By definition of tangent,
tan(A + B) = sin(A + B) / cos(A + B)
Using the angle sum identities for sine and cosine,
sin(x + y) = sin(x) cos(y) + cos(x) sin(y)
cos(x + y) = cos(x) cos(y) - sin(x) sin(y)
yields
tan(A + B) = (sin(A) cos(B) + cos(A) sin(B)) / (cos(A) cos(B) - sin(A) sin(B))
Multiplying the right side by 1/(cos(A) cos(B)) uniformly gives
tan(A + B) = (tan(A) + tan(B)) / (1 - tan(A) tan(B))
Since 2 tan(A) = 3 tan(B), it follows that
tan(A + B) = (3/2 tan(B) + tan(B)) / (1 - 3/2 tan²(B))
… = 5 tan(B) / (2 - 3 tan²(B))
Putting everything back in terms of sin and cos gives
tan(A + B) = (5 sin(B)/cos(B)) / (2 - 3 sin²(B)/cos²(B))
Multiplying uniformly by cos²(B) gives
tan(A + B) = 5 sin(B) cos(B) / (2 cos²(B) - 3 sin²(B))
Recall the double angle identities for sin and cos:
sin(2x) = 2 sin(x) cos(x)
cos(2x) = cos²(x) - sin²(x)
and multiplying uniformly by 2, we find that
tan(A + B) = 10 sin(B) cos(B) / (4 cos²(B) - 6 sin²(B))
… = 10 sin(B) cos(B) / (4 (cos²(B) - sin²(B)) - 2 sin²(B))
… = 5 sin(2B) / (4 cos(2B) - 2 sin²(B))
The Pythagorean identity,
cos²(x) + sin²(x) = 1
lets us rewrite the double angle identity for cos as
cos(2x) = 1 - 2 sin²(x)
so it follows that
tan(A + B) = 5 sin(2B) / (4 cos(2B) + 1 - 2 sin²(B) - 1)
… = 5 sin(2B) / (4 cos(2B) + cos(2B) - 1)
… = 5 sin(2B) / (4 cos(2B) - 1)
as required.