Two negative charges of unit magnitude and a positive charge q are placed along a straight line. At what position and for what value of q will the system be in equilibrium? Check whether it is a stable or neutral equilibrium.

For equilibrium of q, the forces on it exerted by P and Q must be co-linear, equal and opposite.
Force on q by P
Force on q by Q
towards Q
Hence charge q should be equidistant from P and Q.
For the system to be in equilibrium, the charges P and Q must also be in equilibrium.
Now,
Since Fpq and FPQ are oppositely directed along the same line, we have, for equilibrium,
or
Similarly for the equilibrium of Q, we would get
Thus in magnitude of either charge P or Q.
Stability: A slight displacement of q towards P increases the magnitude of FqP and decreases the magnitude of FqQ. Consequently, the displacement of q is increased. Thus the three charges are no longer in equilibrium. Hence the original equilibrium is unstable for displacement along the axis on which the charges are located. For a displacement of q along a direction normal to the line PQ, the resultant of the two forces of attraction Fqp and FqQ will bring the charge q back to its original position. Thus the equilibrium is stable for displacement in the vertical direction.