He gives the Baker five gold pieces he stole from the giants to buy back his cow, and when the Baker hesitates, Jack climbs back up the beanstalk to find more.
He gives the Baker five gold pieces. He stole five gold pieces from the giants. This was to buy back his cow. Jack climbs back up the beanstalk to find more. The Baker hesitates.