Answer:
y=-6.
Step-by-step explanation:
1) the condition f(-1)=-6 and f(4)=-6 mean points A and B have coordinates (-1;-6) and (4;-6);
2) the points A and B has the same y-coordinate, it means, the required line is parallel to the x-axis and the required function is: y=-6.
P.S. the suggested way is not the only one.