The work done in moving a charge \( q \) between two points in an electric field is given by:
\[
W = q \Delta V
\]
where \( \Delta V \) is the potential difference between the two points, and \( q \) is the charge being moved.
- The potential difference between points A and B is:
\[
\Delta V = V_A - V_B = 3 \, \text{V} - 5 \, \text{V} = -2 \, \text{V}
\]
- The charge being moved is \( q = 5 \, \text{mC} = 5 \times 10^{-3} \, \text{C} \).
Now, the work done in moving the charge is:
\[
W = (5 \times 10^{-3} \, \text{C}) \times (-2 \, \text{V}) = -10 \times 10^{-3} \times 2 \, \text{J} = -40 \, \text{J}
\]
Thus, the work done in moving the charge from B to A is:
\[
W = -40 \, \text{J}
\]
Hence, the correct answer is:
\[
-40 \, \text{J}
\]