the only rule is that you are not allowed to contextualize this in any way. you have to take it for what it is in a vacuum, so to speak.
you are walking down the street when a man pulls out a gun and threatens to shoot you. you pull out your own gun to defend yourself, but before either of you can shoot, your assailant grabs a child who is walking by and holds the child in front of him for protection. based on the parameters of the thought experiment, you know you cannot shoot and kill your attacker unless you shoot through the child, in which case you know with a certainty you will kill both people. you know with a certainty that your attacker wants to kill you, he does not want anything else (there's no negotiating), and you are certain that he is going to start shooting at you from behind the cover of the child, but you are fairly unlikely to be hit from that distance.
if you decide to shoot through the child and kill the man and child both, at what level are you morally culpable for the child's death? again, don't add in any extra details, just leave it as is.