Let's do this in chunks. 8:40am is 20 minutes to 9. So the first chunk is 20mins. 9am till 12 noon is 3hrs, so that's 3hr 20mins so far. From noon till 5pm is 5hrs, making 8hr 20mins. Take off 30 mins for the break. Take 20 mins off first leaving 8hrs, then take off 10 mins, making 7hrs 50mins.