The expression on the left needs to be reduced to terms involving sin(x) or cos(x).
sin(2x)≡2sin(x)cos(x); cos(2x)≡1-2sin2(x) or 2cos2(x)-1.
5cos(x)-2sin(2x)≡5cos(x)-4sin(x)cos(x)≡cos(x)(5-4sin(x)).
2cos(2x)-3sin(x)+8≡2-4sin2(x)-3sin(x)+8=10-3sin(x)-4sin2(x)=(2+sin(x))(5-4sin(x)).
(The clue to the factorisation is the appearance of sin(x)+2, the same as 2+sin(x), in the denominator on the RHS.)
So the expression becomes:
(cos(x)(5-4sin(x)))/((2+sin(x))(5-4sin(x)))=cos(x)/(2+sin(x)) because the common factor 5-4sin(x) cancels out. QED
Note that 5-4sin(x) can never be zero because sin(x) cannot exceed 1. This implies that it is safe to cancel the factor because the identity is true for all x.