cot(2x) = (cos(x) +cos(3x)) / (sin(3x) +sin(x)) -------(i)

Or, rewriting that,

cot(2x) = [cos(3x) +cos(x)] / [sin(3x) +sin(x)] -------(ii)

RHS of (ii) =

= [cos(3x) +cos(x)] / [sin(3x) +sin(x)]

Using trig identities:

cosA +cosB = 2cos((A+B)/2)cos((A-B)/2)

sinA +sinB = 2sin((A+B)/2)cos((A-B)/2),

= [2cos((3x+x)/2)cos((3x-x)/2)] / [2sin((3x+x)/2)cos((3x-x)/2)]

= cos(2x) / sin(2x)

= cot(2x)

= LHS

So, proven.