Cars A and B travel the same distance. Car A travels one-quarter of the distance at miles per hour, one-half at miles per hour, and one-quarter at miles per hour. Car B travels one-third of the time at miles per hour, one-third at miles per hour, and one-third at miles per hour. Find the average speeds of Car A () and Car B ().