There's one more way to solve it:
tan 3x - tan x = sin (3x- x) / (cos 3x cos x)
& cot 3x - cot x = sin(x - 3x) / (sin 3x sin x)
Putting in the given expression:
= cos 3x cos x / sin 2x - sin 3x sin x / sin (-2x)
= (cos 3x cos x + sin 3x sin x) / sin 2x
= cos 2x / sin 2x
= cot 2x.
This gives the same result.