A and B depart simultaneously from location and travel at a constant speed towards location , while C departs from location and travels at a constant speed towards location . After 20 minutes, A meets C. Then, A immediately turns around, meets B after 10 minutes, and then turns around again to head towards location . When A reaches location , B has passed the midpoint between locations and by 105 meters, while C is still 315 meters away from location . Determine the ratio of A's speed to B's speed and the distance between locations and .