Once they help the dog they try to find its owner. It happened to be Mr. Mertle. He is the mean old man that lives on the other side of the fence. This fits in with a new life because the boys were just running away from the dog and now they are friends.
When they show Mr. Mertle the ball, he feels bad for them. So he made a deal with them. If they walk the dog (Hercules) he would give them a ball signed by all of the Yankees team.
At the end the boys play baseball with Mr. Mertle watching from his porch and Hercules playing around with them.