We can start with the basics. What we know is that this entire trip took 6 hours. So the travelers were able to walk on the level, uphill, and downhill in a total of 6 hours.
A level mile takes 1/4 of an hour (15 minutes). An uphill mile takes 1/3 of an hour (20 minutes). A downhill mile takes 1/6 of an hour (10 minutes). So, to go and return over the same mile takes half an hour. This means that in 6 hours, they went 12 miles and came 12 miles back. So they went a total of 24 hours.
If the 12 miles had been all level, it would have taken approximately 3 hours. It the 12 miles had been all uphill, it would have taken approximately 4 hours. When reaching the peak, 3.5 hours would have been the approximate time it took them to reach the top since it is in between.