Solving Trigonometry Equations Cosine/Sine graph help

I am really stuck in this question. if someone could help me, that'd be awesome.

Solve the equation 2cos^2x + cosx-3=0, where -pi is less than or equal to x, which is less than or equal to +pi. Then make a general solution for that equation.

I am just so clueless with math in general.

Even factoring the equation is confusing me.

Does 2cos^2x +cosx -3 Factor out to be: (2cosx+3)(Cosx-2) or does it factor out to be (cosx-1)(Cosx+3)

Because depending on whether you put the "-2" in the same brackets as the Coefficient of 2 (Ie. [2cosx-2] or [2cosx-3]) It will factor out differently.

If someone could help me with the whole equation in general. that'd help. thank you!