Anyway, different sorts of things having different values is why so many people are concerned about powerful non-human entities with inhuman motivations (AIs generally, and corporations particularly.) It's also the reason people are afraid of hungry bears (the bear cares more about itself than you.)
The value judgement could simply come from the fact that we need to preserve our own species, and if we need to sacrifice some small percentage of dogs to do so, than this is perfectly reasonable. We can still exhibit empathy by accepting that this situation is not ideal and striving to reduce that percentage down to 0, maybe by inventing substitutes.
As for the machines example, I would expect the machines to place higher value on their own life than on human life, precisely because they would be objectively superior, which is why I would not let machines exist without any restrictions, even if the machines would be a more useful dominant species.
Machines experience no pleasure or pain and thus there is zero utility gained/lost by destroying them. Dogs and humans do; it's bad to kill or torture them.
Throwing a dog in front of a train (or killing/torturing it for research) to save a child depends on how likely it is that it will work, and how many QALYs the dog and child have left.