Step-by-step explanation:
between -1 and +1 it is constant, a flat, horizontal line at y = 4.
and that is already the function definition for that part.
y = f(x) = 4
so you simply put 4 into the first answer box.
between +3 and +5 it is a nice, constant line that increases f(x) with increasing x.
for the slope we see that the line is a perfect square diagonal, y increases by 1 with every x increase by 1.
so, the slope is 1/1 = 1
but extended the line would not go through the origin (0, 0). so, we need to give a little correction.
we see when x = 3, y = 2, and for x = 5, y = 4. y is always one unit smaller than x. or y = x - 1
and that is already our functional definition
y = f(x) = x - 1
so, you put x - 1 into the second answer box.