Answer
The function is given by
$$y=\Bigg\{_{-\frac{1}{2}x+3,\quad x>0.}^{x+3,\quad x\leq0;}$$
Work Step by Step
This is an example of a part by part linear function.
We will use the fact that the equation of the linear function passing through points $(x_1,y_1)$ and $(x_2,y_2)$ is given by
$$y=\frac{y_2-y_1}{x_2-x_1}(x-x_1)+y_1$$
For $x\leq0$ we will choose the points $(-3,0)$ and $(0,3)$ giving
$$y=\frac{3-0}{0-(-3)}(x-(-3))+0=\frac{3}{3}(x+3)$$
which gives finally
$$y=x+3.$$
For $x\geq0$ we will chose $(0,3)$ and $(4,1)$
$$y=\frac{1-3}{4-0}(x-0)+3=\frac{-2}{4}x+3$$
finally giving
$$y=-\frac{1}{2}x+3.$$
Now we can write
$$y=\Bigg\{_{-\frac{1}{2}x+3,\quad x>0.}^{x+3,\quad x\leq0;}$$