Answer
The solution is
$$y=\bigg\{_{-\frac{1}{3}x+3,\quad x\geq3}^{x+1,\quad x<3;}$$
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$$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<3$ we can take $(0,1)$ and $(2,3)$ so we get
$$y=\frac{3-1}{2-0}(x-0)+1=\frac{2}{2}x+1$$
so we get
$$y=x+1.$$
For $x\geq3$ we can take $(3,2)$ and $(6,1)$ to get
$$y=\frac{1-2}{6-3}(x-3)+2=\frac{-1}{3}(x-3)+2.$$
This can be rewritten as
$$y=-\frac{1}{3}x+3.$$
Putting this together we get
$$y=\bigg\{_{-\frac{1}{3}x+3,\quad x\geq3}^{x+1,\quad x<3;}$$