We use a similar strategy as in your previous question. Rewrite:
sin(5x) = sin(6x - x) = sin(6x) cos(x) - cos(6x) sin(x)
sin(7x) = sin(6x + x) = sin(6x) cos(x) + cos(6x) sin(x)
→ sin(5x) - sin(7x) = -2 cos(6x) sin(x)
sin(4x) = sin(6x - 2x) = sin(6x) cos(2x) - cos(6x) sin(2x)
sin(8x) = sin(6x + 2x) = sin(6x) cos(2x) + cos(6x) sin(2x)
→ sin(8x) - sin(4x) = 2 cos(6x) sin(2x)
cos(5x) = cos(6x - x) = cos(6x) cos(x) + sin(6x) sin(x)
cos(7x) = cos(6x + x) = cos(6x) cos(x) - sin(6x) sin(x)
→ cos(7x) - cos(5x) = -2 sin(6x) sin(x)
cos(4x) = cos(6x - 2x) = cos(6x) cos(2x) + sin(6x) sin(2x)
cos(8x) = cos(6x + 2x) = cos(6x) cos(2x) - sin(6x) sin(2x)
→ cos(4x) - cos(8x) = 2 sin(6x) sin(2x)
Then
(sin(5x) - sin(7x) - sin(4x) + sin(8x)) / (cos(4x) - cos(5x) - cos(8x) + cos(7x))
= (2 cos(6x) sin(2x) - 2 cos(6x) sin(x)) / (2 sin(6x) sin(2x) - 2 sin(6x) sin(x))
= (2 cos(6x) (sin(2x) - sin(x))) / (2 sin(6x) (sin(2x) - sin(x)))
= cos(6x) / sin(6x)
= cot(6x)
QED