Because you have cosx and sin x in the equation, you cannot easily solve it by factorising. Ideally, you only want one trig function, ie, all sin or all cos or all tan.
By dividng through by cos%5E%7B2%7Dx, you end up with
tan%5E%7B2%7Dx-3tanx+2=0
Now you can solve easily by letting tan x = x...