1.you can use velocity by aim:
PHP Code:
new Float:Vel[3]
velocitybyaim(playerb_id, 20.0, Vel[3])
then negate Vel[0] to Vel[2] and add them to player B's origin. The outcome will be player B's back. You can modify 20.0 to any number you want till you're satisfy.
2.You can take a look at some dias's npc plugins.
I'm typing from my phone so there's might be some typos