Given the piecewise function:

Let's select the graph which represents the function.
We have the graph below:
For f(x) = 3, the graph will be a horizontal line on y = 3 which has an open dot on x = 0 and a closed dot on x = -2
For f(x) = 1 if x = 0, the graph will have a closed dot located on the point (0, 1)
For f(x) = -(x + 1) if 0 < x ≤2, the graph will have a negative slope with an open dot on (0, -1) and closed dot on (2, -3)
ANSWER:
Graph B