Answer
The maximum is $f(2)=2 \sqrt{5}-2$ and the minimum is $f\left( \sqrt{\dfrac{1}{3}}\right) =\sqrt{3}$
Work Step by Step
Given $$y=2 \sqrt{x^{2}+1}-x, \quad[0,2]$$
Since
\begin{align*}
\frac{dy}{dx}&=\frac{2x}{\sqrt{x^2+1}}-1\\
&=\frac{2x-\sqrt{x^2+1}}{\sqrt{x^2+1}}
\end{align*}
Find the critical points
\begin{align*}
f'(x)&=0\\
\frac{2x-\sqrt{x^2+1}}{\sqrt{x^2+1}}&=0\\
2x-\sqrt{x^2+1}&=0\\
3x^2 -1&=0
\end{align*}
Then $x=\pm \sqrt{\dfrac{1}{3}}$. Because $- \sqrt{\dfrac{1}{3}}\notin [0,2]$, then $f(x)$ has a critical point at $x= \sqrt{\dfrac{1}{3}} $, so
\begin{align*}
f\left( \sqrt{\dfrac{1}{3}}\right)&=\sqrt{3}\\
f(0)&= 2\\
f(2)&=2 \sqrt{5}-2
\end{align*}
Then the maximum is $f(2)=2 \sqrt{5}-2$ and the minimum is $f\left( \sqrt{\dfrac{1}{3}}\right) =\sqrt{3}$