Answer
Critical points $x=1, 0$, no endpoints.
At $x=1$, $y=4$ local maximume.
At $x=0$, $y=3$ local minimum.
Work Step by Step
Step 1. Given the function
$y=\begin{cases} 3-x\hspace2.2cm x\lt0 \\ 3+2x-x^2\hspace1cm x\geq0 \end{cases}$
We can find its derivative as
$y'=\begin{cases} -1\hspace1.6cm x\lt0 \\ 2-2x\hspace1cm x\geq0 \end{cases}$.
Step 2. The critical points can be found when $y'=0$ or undefined which happens when $x=1, 0$. The domain of the function is $(-\infty,\infty)$ and there are no endpoints.
Step 3. At $x=1$, $y=3+2-1^2=4$ and we can identify this as a local maximum (use local test points as necessary) as shown in the figure.
Step 4. At $x=0$, $y=3+2(0)-0^2=3$ and we can identify this as a local minimum (use local test points as necessary) as shown in the figure.