You have a 5 minute hour glass and an 8 minute hour glass. You need to cook something for exactly 9 minutes. How will you use the two hour glasses to determine the exact time? There is no way to determine where the halfway mark is with the hourglasses.

Help me please!

What is 3*8-3*5?

Not quite sure how to subtract times using an hourglass. Can't drain the 8' one and then subtract the 5' one.

However, if we do the following, I think it works. There may be more elegant ways:

The three columns show the running time, and the operations of turning glasses, with their remaining sand

time 8' 5'
0 8 5
5 3 0
turn 5'
8 0 2
turn 8'
10 6 0
turn 5'
15 1 0

Now you can start cooking, with 1' of sand in the 8' glass.
After 1 minute, turn the 8' glass and let it drain.

To measure exactly 9 minutes using a 5-minute hourglass and an 8-minute hourglass without knowing the halfway mark, you can follow these steps:

1. Start both hourglasses at the same time.
2. Once the 5-minute hourglass runs out, immediately flip it over to start timing again, and keep the 8-minute hourglass running.
3. When the 8-minute hourglass runs out, immediately flip it over to start timing again, and continue running the 5-minute hourglass.
4. As soon as the 5-minute hourglass runs out for the second time, turn it over one more time.

At this point, the 5-minute hourglass has been running for an additional 4 minutes (because it ran for 5 minutes, then 5 minutes, then 4 minutes), and the 8-minute hourglass has been running for a total of 8 minutes. When you turn over the 5-minute hourglass for the last time, leave the 8-minute hourglass as it is.

5. When the 8-minute hourglass runs out for the second time, exactly 9 minutes will have passed in total.

So, to determine the exact time of 9 minutes, you need to use the 5-minute and 8-minute hourglasses in the manner described above.