Safe Zone vs Magic Cylinder
The specific situation you mention does not work out no. Targeting happens at the moment of activation of a card or effect. It's only after that, that you get to chain anything.
So this means that when player B activates magic cylinder, it's already too late.  

However, if player A already had Safe Zone active, player B would not be allowed to play Magic Cylinder.