If we are still doing the trolley problem it would be “the brakes have failed, and … do you continue straight and definitely hit A, or turn the wheel and definitely hit B”.
You should not change lanes unless it is safe to do so. The car should let off the gas, put on hazards and try to move to the side of the road. I am with the other engineers, the trolley problem does not apply here. Why waste effort deciding who lives and who dies when more time can be spent figuring out how to handle these situations safely?