A trip involves travelling by bus and then by car. The speed of the bus is 80 km/h and the car 100 km/h. The total time for the trip was 6 hours and the total distance 520 km. How much time was spent on the bus and in the car?