Answer:
![a)\ f(x)=\left\{\begin{array}{cccc}-x+2&for&x\in(0,\ 2]&/0<x\leq2/\\\\-(1)/(3)x+(5)/(3)&for&x\in(2,\ 5]&/2<x\leq5/\end{array}\right](https://img.qammunity.org/2020/formulas/mathematics/high-school/lrcz8m6afk38zljr4ikc9clbz72cjdfonb.png)
![b)\ f(x)=\left\{\begin{array}{cccc}-3x-3&for&x\in(-1,\ 0]&/-1<x\leq0/\\\\-2x+3&for&x\in(0,\ 2]&/0<x\leq2/\end{array}\right](https://img.qammunity.org/2020/formulas/mathematics/high-school/tg0jl0p6cigyatyaa1rbhqx63hv2wqmzrq.png)
Explanation:
These are graphs of piecewise functions.
Each part is a graph of the linear function.
The slope-intercept form of an equation of a line:

m - slope
b - y-intercept → (0, b)
The formula of a slope:

========================================
a)
Part 1:
Points (0, 2) → b = 2, and (2, 0).
Calculate the slope:

Put the value of m and b to the equation of a line:

Part 2:
Points (2, 1) and (5, 0).
Calculate the slope:

Put the value of the slope and the coordinates of the point (5, 0) to the equation of a line:

add 5/3 to both sides

Therefore we have:

The domain of the function is (0, 2] and (2, 5].
Formula of the piecewise function:
![f(x)=\left\{\begin{array}{cccc}-x+2&for&x\in(0,\ 2]&/0<x\leq2/\\\\-(1)/(3)x+(5)/(3)&for&x\in(2,\ 5]&/2<x\leq5/\end{array}\right](https://img.qammunity.org/2020/formulas/mathematics/high-school/46trt5btrw0caywe0bys5i6bv5naig14el.png)
============================================================
b)
We solve the same as in a) in Part 1
Part 1:
(-1, 0), (0, -3) → b = -3


Part 2:
(0, 3) → b = 3, (2, -1)


Domain: (-1, 0] and (0, 2].
![f(x)=\left\{\begin{array}{cccc}-3x-3&for&x\in(-1,\ 0]&/-1<x\leq0/\\\\-2x+3&for&x\in(0,\ 2]&/0<x\leq2/\end{array}\right](https://img.qammunity.org/2020/formulas/mathematics/high-school/9x0sknrlvih1wy3bvvfadw3rczf4ge646m.png)