Erin started biking to the coffee shop traveling 10 mph, after some time the bike got a flat tire so Erin walked the rest of the way, traveling 4 mph. If the total trip to the coffee shop took 9 hours and it was 72 miles away, how long did Erin travel at each speed?