The ratio between the distances of two cities from a third city is 7:8. If the total distance is 150 km, what are the distances of the two cities from the third one?