Heather left the airport and drove toward her friend's house at an average speed of 30 miles per hour. Cody left 2 hours later driving in the same direction at an average speed of 50 miles per hour. Find the number of hours it took for Cody to catch up with Heather.