Fido ran away from home at a speed of 5 mi/hour. He ran in a straight line. After a while he decided to go back home for dinner so turned around and walked home along the same path he had run on. He walked at 2 mi/hour. The walk home took one hour longer than the run did. How long did Fido run?