Answer
The energy difference between states A and B is $~~0.049~eV$
Work Step by Step
We can find the energy associated with a wavelength $\lambda = 500~nm$:
$E = \frac{hc}{\lambda}$
$E = \frac{(6.626\times 10^{-34}~J\cdot s)(3.0\times 10^8~m/s)}{500\times 10^{-9}~m}$
$E = 3.9756 \times 10^{-19}~J$
$E = (3.9756 \times 10^{-19}~J)(\frac{1~eV}{1.6\times 10^{-19}~J})$
$E = 2.485~eV$
We can find the energy associated with a wavelength $\lambda = 510~nm$:
$E = \frac{hc}{\lambda}$
$E = \frac{(6.626\times 10^{-34}~J\cdot s)(3.0\times 10^8~m/s)}{510\times 10^{-9}~m}$
$E = 3.8976 \times 10^{-19}~J$
$E = (3.8976 \times 10^{-19}~J)(\frac{1~eV}{1.6\times 10^{-19}~J})$
$E = 2.436~eV$
We can find the energy difference:
$2.485~eV-2.436~eV = 0.049~eV$
The energy difference between states A and B is $~~0.049~eV$