Since cos x lies between -1 & 1, the left hand side lies between 4 & 16.

Since sin x lies between -1 & 1 or $sin^8 x $ lies between 0 & 1, the right hand side lies between 2 & 4.

The two sides can become equal only when each one of them is equal to 4.

This happens when cos x of the left hand side is equal to -1 and sin x of the right hand side is equal to 0.

This can only happen when x is an odd multiple of $\pi $.

So, $x=(2n+1)\pi $ where n is any integer.