When John walks to school and then runs home, it takes him 40 minutes.
When he runs both ways, it takes him 24 minutes.
He has one fixed speed whenever he walks, and another fixed speed whenever he runs.
How long would it take him to walk both ways?
This problem is taken from the UKMT Mathematical Challenges