Killing Conjoined Twins using Death Note
Even though only one name is written in the Death Note, if it influences and causes other humans that are not written in it to die, the victim's cause of death will be a heart attack.


Does rule XXVI not answer your question? Mathematically speaking you could rewrite it as follows.


  Causes others to die => (Cause = Heart-attack).


Here you could see that the heart attack would be logically implied as the cause of death if others are influenced, regardless whether they take others with them. Therefore they would both die. Mr. B would also be killed. Remember that this rule does not say that if you would cause another human to die, that you would stay alive. It only says that the cause changes to a heart attack, which in this case would kill both, so the death of the other would be unavoidable in this case.

If this would not have been true, Light would have been able to make himself completely immune to the Death Note, even making it impossible for Ryuk to kill him. Light could have implanted a bomb inside a few people, that would all be triggered when either his heart or their heart stopped beating. He would repeat this over different groups of people. By doing so, Ryuk would be rendered unable to kill Light as it would be impossible to kill any of those with a bomb implanted, as it would kill the others and he would not be able to kill Light as it would kill all of them. This would make Light immune to the Death Note, which I found very unlikely to be true, because it would completely contradict the first and most fundamental rule of the Death Note namely


  The human whose name is written in this note shall die.