Call t = tan x, we get
#(2t)/(1 - t^2)(1/t) - 3 =# #(2t)/(t(1 - t^2)) - ((3t)(1 - t^2))/(t(1 - t^2))# =
#(-t + 3t^3)/(t(1 - t^2)) = (3t^2 - 1)/(1 - t^2) = 0#
Conditions: t different to 0, and different to #+- 1#
#(3t^2 - 1) = 0 --> t^2 = 1/3 -> t = tan x = +- sqrt3/3#
#t = tan x = (sqrt3)/3 -> x = pi/6#
#t = tan x = -sqrt3/3 --> x = (5pi)/6#
Check with #x = (5pi)/6#
#tan 2x = tan ((10pi)/6) = tan ((5pi)/3) = - tan (pi/3) = - sqrt3#
#cot x = cot ((5pi)/6) = - sqrt3#
#f(x) = (-sqrt3)(-sqrt3) - 3 = 0#. OK