The whole word complex (or collocation) is "neben xxx herfiegen". (don't confuse with "hin- und herfliegen" - "flying back and forth").
It's English meaning is "(to) fly besides xxx", so the sentence part would be in English "and he flew besidse Peter and the lion."
At least that's my explanation. Hope that helps.