u=uphill distance, d=downhill distance. AB=u+d when going from A to B, and BA=d+u when returning, because downhill←→uphill when Mr Lim changes direction.
Distance=speed×time.
Time=distance/speed, 9/2=u/20+d/35; 15/4=d/20+u/35.
Multiply through by 140:
(1) 630=7u+4d; (2) 525=7d+4u.
4×(2) is 2100=28d+16u and 7×(1) is 4410=49u+28d=49u+2100-16u=2100+33u.
4410-2100=2310=33u, u=2310/33=210/3=70km.
So 4d=630-490=140, d=35km. AB=70+35=105km.