(a) The work done on the electric charge is ; this is equal to the product of the magnitude of the constant force acting on it and the distance moved in the direction of the force. Hence the electric force is in the direction from A to B.

(b) The electric field is the electric force per unit charge, so is in the direction from A to B.