Solution:
Let the distance in the two cases be y and 2y respectively and the speed be z and 2z respectively.Let the required number of days be x.
more distance,more days(Direct proportional)
More speed ,less days(indirect proportional)
more resting,more days.(Direct proportional)
Distance y:2y::40:x
speed 2z:z::40:x
Resting time 9:18::40:x
y×2z×9x=2yz×18×40
x=2yz×18×40/y×2z×9
x=80
Hence the required number of days=80