hey im stumped at developing a formula for this question:

Chris walks at 8 km/h and runs at 12 km/h. One day he walks and runs on the way from his house to the library. It takes him 20 minutes. On his way back from the library he runs twice as far and the journey home takes 17.5 minutes. How far is his house from the library?

Could you please show me how you did the question?