With proof of the promise being made it could result in a charge of assisted suicide rather than murder, or possibly a manslaughter charge. However it's a slightly tricky one and chances are more than likely person B would still be charged with murder.
Whether person B was found guilty of any of the above offences would depend on the exact circumstances and the juries opinions about it to some extent.
It is possible, maybe, that if person A was suffering from a terminal condition and was in a lot of pain and discomfort which could not be relieved (as well as being in a wheelchair) then person A may receive a lesser sentence due to the defense that they were helping to end the suffering of person A and were motivated only by that and their promise to person A and not by any malicious intent.
There is a legal doctrine known as "Mens Rea" (literally "guilty mind") which means that for a person to be found guilty of a crime, they must have had the intention to commit the act, and they knew, or ought to have known that it was illegal and / or morally wrong to do so. That legal doctrine isn't always applied the way it should be but a good lawyer would probably argue that it applies in this case. However that wouldn't necessarily mean a not guilt verdict, because person B probably did know that killing a person is illegal (even if his intentions were good).
As you can see there are various possible outcomes depending on the exact circumstances and the opinions of the judge and jury. However chances are high that person B would still end up serving some form of prison sentence.