$\color{olive}{f(x) = \sin(x) + \cos(2x)}$
$\color{olive}{f'(x) = \cos(x) - 2\sin(2x)}$
$\color{olive}{f'(x) = \cos(x) - 4\sin(x)\cos(x)}$
$\color{olive}{f'(x) = \cos(x)(1- 4\sin(x))}$
For minima and maxima, $f'(x) = 0$
$f'(x) = \cos(x)(1- 4\sin(x)) = 0$
$\cos(x) = 0$ (or) $1 - 4\sin(x) = 0$
$x = \frac{\pi}{2},\frac{3\pi}{2}$ (or) $\sin(x) = \frac{1}{4} \Rightarrow x = \sin^{-1}(\frac{1}{4})$
Now, the proper method for finding minima and maxima is to check whether $f''(x) \gt 0$ or $f''(x) \lt 0$, but here as we are required to find both minima and maxima, i will directly put values of x and find out.
When $x = \frac{\pi}{2}$, $f(x) = 1 + (-1) = 0$
When $x = \frac{3\pi}{2}$, $f(x) = \sin(\frac{3\pi}{2}) + \cos(3\pi) = -1 + (-1) = -2$
$\sin(x) = \frac{1}{4}$, $\cos(x) = \frac{\sqrt{15}}{4}$, $\sin(2x) = 2\sin(x)\cos(x) = 2*\frac{1}{4}*\frac{\sqrt{15}}{4} = \frac{\sqrt{15}}{8}$ and $\cos(2x) = \frac{\sqrt{64-15}}{8} = \frac{7}{8}$
When, $x = \sin^{-1}(\frac{1}{4})$, $f(x) = \sin(x) + \cos(2x) = \frac{1}{4} + \frac{7}{8} = \frac{2}{8} + \frac{7}{8} = \frac{9}{8}$
Hence, $\color{navy}{f(x)_{max} = \frac{9}{8}}$ and $\color{navy}{f(x)_{min} = -2}$