for the first trip, if you suppose that he is travelling at a speed of x miles/hour and suppose that he takes t hours to complete the trip, then:

x miles/hour * t hours = 36

xt=36

likewise for the second trip, his speed is (x-3) miles/hour and time is (7-t) hours...