If sinA-sinB=x and cosA+cosB=y than tan(A+B/2) is:

using your sum-to-product formulas,

x = sinA - sinB = 2 cos(A+B)/2 sin(A-B)/2
y = cosA + cosB = 2 cos(A+B)/2 cos(A-B)/2
that means that
x^2 + y^2 = 4 cos^2(A+B)/2 sin^2(A-B)/2 + 4 cos^2(A+B)/2 cos^2(A-B)/2
= 4 cos^2(A+B)/2 (sin^2(A-B)/2 + cos^2(A-B)/2)
= 4 cos^2(A+B)/2
= 4/sec^2(A+B)/2
= 4/(1 + tan^2(A+B)/2)
now you have
(1 + tan^2(A+B)/2)/4 = x^2 + y^2
tan^2(A+B)/2 = 4(x^2 + y^2) - 1
tan(A+B)/2 = √(4(x^2 + y^2) - 1)