The scenario is one that requires so many worst-case-scenario events to be happening simultaneously as to say the scenario is likely avoidable altogether in one of numerous ways. So yes, I'm calling your hypothetical scenario a little contrived.
To answer the hypothetical with the answer you're expecting; people have already made this choice in the past for disaster scenarios:
"Women and children first."
The algorithm would choose to hit the elderly person over the child in your scenario. The ethical choice becomes more complex if the pedestrians in question are both children or both women. I don't think humans have made an ethical decision on such a choice.