I really don't understand the sign Work and energy in an electric field This might be a super simple question to answer but I can't find one that makes sense to me and I feel like I am getting conflicting answers. I have always thought that positive work means that the particle is being moved in the direction the field would move it anyway (or at least some component of the force is). But I was looking at two examples that did not make sense to me.
The first example was just a simple positive charge in an electric field and I said the field would do positive work on the particle because the displacement and force are in the same direction, but I was told that it was negative and I do not understand why.
The second was three particles in a line one with charge -e and 2 with charge e at 0, a and 2a on the line respectively. The question asked what the work would be to move the third charge from infinity to 2a. I said that the work should be negative since the field is pushing the particles apart (since the two positives are closer than the first negative and the new positive), but the answer says that work is positive and I am very confused.
Please help me understand how I can tell when work is positive and when work is negative because every time I feel like I understand another example comes and proves me wrong.
 A: You first need to decide what is doing the work.
Is it the field or is it an external force.
I said the field would do positive work on the particle because the displacement and force are in the same direction
is correct.
An external force, equal in magnitude but opposite in direction to the force exerted by the field, would be doing negative work because he external force's  direction is opposite to the of the displacement of the charge.
I said that the work should be negative since the field is pushing the particles apart (since the two positives are closer than the first negative and the new positive), but the answer says that work is positive
To move a positive charge to position $2a$ requires an external force to do positive work as overall the force of repulsion between the positive and negative charges will be larger than the force of attraction between the opposite charges.
The force exerted by the field will be equal in magnitude but opposite in direction to the force exerted by the external force so overall the work done by the field will be negative.
You can think of it in terms of electric potential energy.
The electric potential energy of the final state of the system is greater than the initial state so external work must have been done on the system of charges to produce the increase in potential energy.
A: The key words are "on" and "by". Suppose work is done by A on B. This means that energy is transferred from A to B. The work is positive if A loses energy and B gains energy; negative if it is the other way around.
If you have a charged object with an electric force increasing its speed, then the electric field (or the apparatus producing it) is doing positive work on the charged object.
There is often confusion when potential energy is involved, because the energy is sometimes associated with the field/potential and sometimes associated with the particle. For example, if I lift a 1kg book from the floor to a 1m high table I have done 9.8K of work by increasing the potential energy of the earth/book gravitational system (using some of my own chemical energy). We usually say that I have put potential energy into the book. If the book falls off the table we can say it converts its potential energy to kinetic energy OR we can say that the gravity field does work on the book increasing its (kinetic) energy.
Regarding the particle moving in the same direction as the electric force acting on it, for the question as you have stated it your answer would be correct and your puzzlement is understandable. There is a decrease in the particle's potential energy (also regarded as the potential energy in the electrostatic system) and probably an increase in the particle's kinetic energy.
However there can be a confusing aspect when dealing with electrical systems. Often the only relevant energy in electrical situations is the potential energy. For example when electrons move in a wire they move quite slowly because almost all of any kinetic energy they gain is lost in interactions with the rest of the wire. As a result, when charges move in a wire the result is that the work done on the charges is negative, because they lose potential energy and do not gain kinetic energy.
For the second example consider what would happen if the third charge were free to move along the line. It would move away, as you suggested, and it would have kinetic energy, potential energy having been lost from the system (of the 3 charges). This can also be regarded as the electrostatic system doing work on the 3rd charge. However if the 3rd charge were at infinity (assumed to be stationary) work would need to be done on the system - energy supplied to the system from somewhere else - to move the 3rd charge back to 2a. This means the work done on the system would be positive.
