time interval= 4:00 pm to 9:00 am
Let 4:00 pm be 1 hr.
After 12 hours half of the day is complete. So, after 12 hours the time would be 4:00 am. But, the final time is 9:00 am and time difference between 9:00 am and 4:00 am is 5 hours.
So the total time taken=12+5=17 hours
We know that, average speed = total distance travelled/total time taken