The taxiing speed is 2 * 40 = 80 km/h.
Then (1/3) * x/40+(2/3) * x/80 = x/40-5/60 gives x= 10 km.
(2) Class B should pay 70*2= 140 yuan.
B is similar to Class A Shaojiao 189- 140 = 49 yuan.
Class A bought X kilograms of apples for the first time.
If the apple that A bought for the second time was 50kg, it was 50*2+20*3= 160 less than 189, so the apple that A bought for the second time would not exceed 50kg.
If the apples bought by Class A for the first time and the second time both exceed 30kg, it will cost 70*2.5= 175 less than 189, so it is impossible to exceed 30kg for the first time.
Then x is less than 30, then the equation is 3*x+(70-x)*2.5= 189, and x = 28kg, and the second purchase is 42kg.
(3) Let the average speed from Beijing to Tianjin be x kilometers per hour.
Then x*(0.5+6/60)=(x+40)*0.5 gives x=200 km/h.