Understandable. However, it points up an interesting dichotomy that Dennis Prager has alluded to many times: Given their same situation would you save the human or the dog from disaster first? Morally, we are obligated to the human.
Difficult? You betcha.
Yes that would be a difficult choice but I feel sure I would rescue the human first....... then I might die trying to save the dog.
Answer...Enlist the dog’s help in saving the other human.... they have been doing that for thousands of years!