The wolf and the cabbage can be left together with no risk to either. So the farmer first takes the goat across. He returns to the near side, retrieves the cabbage, then takes it across to the far side. Then he returns to the near side with the goat. At the near side, he leaves the goat and takes the wolf to the far side, leaving the wolf with the cabbage. Finally, he returns to the near side to take the goat across for a second time. Problem solved!