The work done \( W \) to move a charge \( q \) through a potential difference \( V \) is given by the formula:
\[
W = qV
\]
where:
- \( W = 12 \, \text{J} \) (work done),
- \( q = 3 \, \text{C} \) (charge).
We can rearrange the formula to solve for the potential difference \( V \):
\[
V = \frac{W}{q} = \frac{12}{3} = 4 \, \text{V}
\]
Thus, the potential difference between points A and B is 4 V.