It's a shitty situation.Gorilla did nothing wrong. That's fucked up
They can either tranquilize and wait until it takes effect, but then there's a chance the gorilla would erupt and harm the child. No point in risking the chance, so they just kill it.
Mother should definitely be charged though for not watching the kid.