From the line plot given in the question
Each x sign represents an hour
The number of hours spent by 1/4 = 2 hours
The number of hours spent by 3/4 = 3 hours
The total amount of time spent by all students who studied 1/4 or 3/4 = 2 + 3 hours
=> 5 hours
Option B is correct