Average speed = total distance ÷ total time (not the average of the two speeds).
Let the one-way distance be \(d\) km.
• Time from A to B = \(\frac{d}{60}\) hours
• Time from B to A = \(\frac{d}{40}\) hours
• Total time = \(\frac{d}{60} + \frac{d}{40} = \frac{2d + 3d}{120} = \frac{5d}{120} = \frac{d}{24}\) hours
• Total distance = \(2d\) km
• Average speed = \(\frac{2d}{d/24} = 2d \times \frac{24}{d} = 48\) km/h
Final Answer: 48 km/h