If a legendary Pokémon ever saved me from some sort of a dangerous situation, then I would be extremely appreciative of it and generously say "thank-you" to express my gratitude. (: I probably wouldn't try to catch it or do anything too extreme. Legendaries are one-of-a-kind, so they should all remain free and not belong to any trainer (in my opinion, anyway). I would definitely try to befriend it though, because it would be an amazing accomplishment to gain a legendary Pokémon's trust!