How do I calculate the number of hours and minutes that two time ranges intersect?

Example:

A | B | C
Name | Start | Stop
Bob | 4:00am | 3:30pm
Sue | 8:00am | 7:00pm


What formula would calculate how many hours and minutes these two people worked together?