The correct option is B Opposite to the bullet's direction.
The total momentum of the bullet-pistol system was initially zero as both of them were at rest with respect to ground. During the shooting of the bullet, net external force on the gun and bullet system is zero. Hence, according to the law of conservation of momentum, the total momentum of the system will be zero even after firing the shot. Since the momentum of the bullet will be in forward direction, in order to balance it, the momentum of the pistol should be in backward direction or the pistol should move backwards.