Relativistic effects are present here... but I assume that the transition from level $a$ to level $g$:
- has $DeltaL = pm 1$ (the total change in angular momentum is exactly $1$).
- has $DeltaS = 0$ (no changing between spin-paired and spin-parallel).
- is not influenced by relativistic effects (e.g. those that make one transition more favorable than another in cases of close-lying atomic orbitals, particularly big $f$ orbitals).
If that is the case, then since we only care about the photon...
$DeltaE = hnu$
...as long as you know the frequency of whatever light you chose in $"s"^(-1)$. $h$ is , $6.626 xx 10^(-34) "J"cdot"s"$.
I will not use the Rydberg equation, as it only works on hydrogen atom. Clearly, mercury has more than one electron, so it has nondegenerate orbitals of the same $n$ with differing $l$ (unlike hydrogen atom).