Answer
The maximum is $f(-\pi/6) \approx2.488$ and the minimum is $f(0)=0$
Work Step by Step
Given $$ y =\sec ^{2} x-2 \tan x \quad \text { on }\left[-\frac{\pi}{6}, \frac{\pi}{3}\right]$$
Since
\begin{aligned}
y'&=2 \sec x \cdot \sec x \tan x-2 \sec ^{2} x\\
&=2 \sec ^{2} x(\tan x-1)
\end{aligned}
Then $f(x)$ has critical points when
\begin{align*}
f'(x)&=0\\
2 \sec ^{2} x(\tan x-1)&=0
\end{align*}
Then $x=\pi/4\in\left[-\frac{\pi}{6}, \frac{\pi}{3}\right] $, since
\begin{align*}
f(-\pi/6)&\approx2.488\\
f(\pi/4)&=0\\
f(\pi/3)&\approx 0.5359\
\end{align*}
Hence the maximum is $f(-\pi/6) \approx2.488$ and the minimum is $f(0)=0$