For defining electric potential we take the reference of zero potential at infinity.
The electric potential at any point in an electric field is defined as the work done in bringing per unit (infinitesimal) positive test charge from infinity to given point. If W is the work done is bringing test charge q0 from infinity to given point in an electric field, then electric potential
q0 is taken as infinitesimal so that it may not affect the original electric field; hence it is better to write
Definition of Electric Potential Difference : The electric potential difference between two points in an electric field is defined as the work done in bringing per unit infinitesimal positive test charge from one point to another against the direction of electric field.
If is the work done in bringing the positive test charge from B to A, then electric potential difference between A and B is