Okay, I have a few minutes to spare so might as well waffle on about this, Whenever you're given a question of this type you should first look at what they're asking. There is a distinction between ordinates (number of lines) and intervals (number of bars). If they're asking about ordinates or number of lines then your first thing is to either draw on the paper or sketch a squiggly graph. Sometimes you aren't given a diagram in which case, sketching a random squiggly graph to imitate the diagram is
essential. In this example, you'd need to see that "okay, they want five lines or 5 ordinates (same thing)" then you draw 5 lines down as so:
Then you count the number of intervals manually and you see 4 intervals. So now you know that you want to do
43−1=42=0.5 lengths. Then you can then label each line with the "1.5, 2, 2.5, 3" to help you.
On the other hand - if you were given "we want 5 (equal width)
intervals" Then you sketch your graph, etc... and this is what you should draw:
and from there you can see what the width of interval should be and you should be able to label each line with the appropriate x coordinate. Then proceed with the rest of the question normally.
Please, please, please make sure you always do this whenever you're doing this kind of question. It will save you from innumerable mistakes. Even if you're not given a diagram, just sketch a rough one, it doesn't need to be accurate at all.