100÷4=25
B takes it first, so no matter how much medicine B takes.
The sum of the quantity taken by A and that taken by B is equal to 4.
For example:
B takes 2, A takes 2.
B takes 3 and A takes 1.
B takes 1 and A takes 3.
This way, the last one will definitely be taken away by A.
So A must win.