The farmer first takes the goat across. Then he returns and takes the cabbage, but when he drops off the cabbage, he takes the goat back with him. He then takes the wolf across and leaves it with the cabbage. Finally, he returns to bring the goat across.