In the first picture, Jack is asked by his mother to sell their only cow to earn some money, for they were poor and could barely afford anything.
In the second picture, Jack meets a stranger that offers to buy the cow, in exchange to five magic beans. (Jack agrees and returns home with the beans.)