The solution: When he travels back across the river, he retrieves the fox. When he gets back home, he takes the chicken back across the river because he can't leave the fox alone with the chicken. Then he trades the chicken for the bag of corn, leaving the chicken all alone on the other side.