John took 12 hours to make the round trip to his uncle. His average speed going was 20 mph and while coming back hos average speed was 30 mph.
Let the time taken while going equal T, the time taken to come back is 12 - T. As distance = speed*time
T*20 = (12-T)*30
=> 20T = 360 - 30T
=> 50T = 360
=> T = 7.2
John took 7.2 riding to his Uncle's and 4.8 hours coming back.