Correct Answer: 24 kmph
Explanation:
Total time taken = k/40 + 2k/20 hours
= 5k/40 = k/8 hours
Average speed = 3k/(k/8) = 24 kmph.