Can someone help me to solve this equation

They ask Show that the equation 2tan^2xcosx=3 can be written in the form 2cos^2x+3cos-2=0

I got it right so far to make everything cos but not without the ^2

here is what i did:

2tan^2xcosx =3

---------------------------------------------------------------------------------

2sin^2x

---------- cosx = 3

2cos^2x

---------------------------------------------------------------------------------

2-2cos^2x

------------

2cos^2