I think your question is incomplete. There must be some clause added there like, the person can cross the bridge with only one of them at a time and if the hyena and goat are left alone, the hyena will eat the goat and if the yam is left alone with the goat then the goat will eat the yam.
Looks like you are new here. Register for free, learn and
contribute.