The farmer first takes across the goat, leaving the wolf and cabbage.
He then returns by himself, and then takes across the wolf. He then
takes the goat back to the bank where he started, where he picks up the
cabbage and takes it across. The farmer then goes back and finally takes
the goat across the river.

Of course, after first taking the goat across, the farmer could
alternatively take the cabbage, return the goat and then take the wolf.