ANSWER
Option B is correct
Step-by-step explanation
On the interval,

The function is a straight line graph with x-intercept

and y-intercept

The equation of this line is
y=2x-2
On the interval, 2≤x≤5,
The equation is the constant function, y=4
On the interval x>5,
The equation is y=x+1
The correct choice is B.