Why my external work equals the negative of the work done by electric force if i move positive test charge from infinity to a certain point in the electric field of positive charge
Bringing a test change from infinity to a specified location involves no change in kinetic energy. There must be no net force on the test charge at all times and the test charge is moved with a constant speed to the target location. Therefore, an equal and oppposite external force is needed to balance the electric force. The work done by the two forces therefore have opposite signs.
The potential is simply this external force integrated from infinity to the target location.