john took a bus from home to market , that travels at 50 kmph . while walking back at 5 kmph , halfway through , he suddenly realized he was getting late and he cycled back the remaining distance in 35 kmph . find the average speed .