Assume, without loss of generality (because you can switch a and b and the expression would still be the same)
a = 1 + i
b = 1 - i
(worked out by quadratic formula)
x + 1 = cot theta
sub a, b, x+1 basically everything into LHS expression and simplify