The work done by the battery is equal to the charge transferred during the process times the potential difference between the two terminals of the battery:

where q is the charge and

is the potential difference.
In our problem, the work done is W=39 J while the potential difference of the battery is

, so we can find the charge transferred by the battery:
