Example 3. Find the maximum and minimum values of $y=\sqrt{x+3}+\sqrt{1-x}$.

Translate the above text into English, please keep the original text's line breaks and format, and output the translation result directly.
$$
\because \quad \sqrt{x+3}+\sqrt{1-x}-y=0 \text {, }
$$

there is $(\sqrt{x+3})^{2}+(\sqrt{1-x})^{2}=2^{2}$,
$\therefore$ the line $v+u-y=0$ intersects with the quarter circle $v^{2}+u^{2}=2^{2}(v$ $\geqslant 0, u \geqslant 0$ ) at the common point $(\sqrt{x+3}, \sqrt{1-x})$.
As shown in the figure, the line $v+u-y=0$

is a set of lines parallel to $l_{1}$, it is easy to
see that the distance from the midpoint $C(1+\sqrt{2}$,
0 ) of $A B$ to $l_{1}$ is $1-\frac{\sqrt{2}}{2}$,
thus the distance from $C$ to $v+u-y=0$ is
$$
\frac{|1+\sqrt{2}+0-y|}{\sqrt{2}} \leqslant 1-\frac{\sqrt{2}}{2}
$$

therefore, $2 \leqslant y \leqslant 2 \sqrt{2}$,
$$
\therefore y_{\text {min }}=2, y_{\max }=2 \sqrt{2} \text {. }
$$