The blue line has slope +1 and passes through the point (-3, 0). Using the point-slope formula, its equation would be
y - 0 = 1 (x - (-3))
or
y = x + 3
and so f(x) is defined by x + 3 for x ≤ 0.
The red line is horizontal for 0 < x < 3, so f(x) has a constant value of 1 for this interval. We use a strict inequality because the points (0, 1) and (3, 1) are unfilled circles.
The black (?) line has slope -1 and passes through (3, 0), so its equation is
y - 0 = -1 (x - 3)
or
y = -x + 3
so f(x) is defined by -x + 3 for x ≥ 3.
Putting everything together,