After t hours, the first truck covers a distance of (70 km/h) t while the second truck covers a distance of (80 km/h) t. So the distance between them is
(70 km/h) t + (80 km/h) t = (150 km/h) t
They are 900 km apart after
(150 km/h) t = 900 km ===> t = (900 km) / (150 km/h) = 6 h