A train travels a total distance of 470 miles in 10 hours. During the first part of the trip, the average speed of the train was 55 miles per hour. During the second part of the trip, the average speed was 45 miles per hour. How many hours did each part of the trip take?