Work done = 10 Joule
Charge = 2 Coulomb
Potential of point A = VA = 10J/2C
Given, work done = 20 Joule=5V
Charge = 2 Coulomb
Potential of point B = VB =20J/2C=10V
Potential difference between two point A and B is
V = VB – VA
= 10V – 5V = 5V
Work done directly from A to B
Work done = Potential difference × charge
= 5V × 2C
= 10 Joule