chased after him and attacked him
Here "him" refers to the lion or bear.
rescued it out of his mouth
Here "it" refers to the lamb.
he rose up against me
"it attacked me"
caught him by his beard
The "beard" refers to the lion's mane or the hair on the bear's face.