Position A, B, C is the needed position to be in to trap xiao qiao.
If you don't fill position A, the npc will move around you and go ahead, so make you you keep position A fill in (I tested it already).
In case you can't tell from the pic
oracle - exactly horizontal to npc
sheriff - one tile ahead horizontally to npc
druid - two tiles ahead horizontally to npc
When you move your mercs at first turn make a note of how far your mercs can move at each turn.
If you are soloing this, sometimes you could be short on a tile when you move, so make full use of how many tiles your mercs can move. I lost the npc a couple of times because i couldn't get any mercs to fill in position B, everyone was short on tile movement by 1 ... >.<
That's why I made a note of which column the mercs will have to be to trap npc on the first picture.
Extra security - I noticed if I filled position B first, sometimes I can't get any mercs to move to position A. Try to get a merc to fill in position A first , then B, then C.
Trapping npc should be alot easier if you duo, can work together on this.
Another note: You get allies after a couple of turns, what I do is keep npc trapped until those allies spawn from the glowing tent, then move ahead to kill mobs. Its much easier if you got allies to help you.
You can't keep the npc trap forever, eventually the mobs will walk down and if they get near the npc, xiao qiao escapes your trap even if you don't move, its kinda weird that way.
However, you do have enough time to keep npc trapped for upgrades and waiting for allies to spawn.
Good luck!