There is more than one such function, so your question should probably read "... the graph of a function ...".

You are correct that [1,5] means all x, . I would draw the graph by first drawing the minimum and maximum at x=2 and 3, then the minimum (with y value between the two others) at x=4, then connecting them and extending to the whole interval (staying between the minimum and maximum at x=2 and 3).

I think you have to just pick convenient y-values - there's not a single correct answer (unless there's some additional information you didn't put in your post).

- Hollywood