There’s this problem I came across, gives me an invalid answer by using general quadratic formula. Wonder why?

$2\sin^2{x} -5\cos{x} -4 =0 $

Here’s what I did:

$2\sin^2{x} -5\cos{x} -4 =0 $

$2(1-\cos^2{x}) - 5 \cos{x} - 4 = 0$

$2 \cos^2{x} + 5 \cos{x} + 2 =0$

This is a quadratic function of $\cos x$, thus,

$\cos{x} = (-5 + 3)/4$ or $\cos{x}= (-5 - 3)/4$

But, the answer given is $\cos{x}=-\frac{1}{2} $ and WolframAlpha says the same but doesn’t show how to do it.

What did I do wrong?

Update: Thank you very much, everyone. Turns out that I wrote the squareroot of 9 as squareroot of 3. My bad