  We analytically calculate the time series for the perturbations
$\Delta\rho(t),~\Delta\dot\rho(t)$ induced by a general disturbing acceleration
$\boldsymbol{A}$ on the mutual range $\rho$ and range-rate $\dot\rho$ of two
test particles $\textrm{A},~\textrm{B}$ orbiting the same spinning body. We
apply it to the general relativistic Lense-Thirring effect, due to the
primary's spin $\boldsymbol{S}$, and the classical perturbation arising from
its quadrupole mass moment $J_2$ for arbitrary orbital geometries and
orientation of the source's symmetry axis $\boldsymbol{\hat{S}}$. The
Earth-Mercury range and range-rate are nominally affected by the Sun's
gravitomagnetic field to the $10~\textrm{m},~10^{-3}~\textrm{cm s}^{-1}$ level,
respectively, during the extended phase (2026-2028) of the forthcoming
BepiColombo mission to Mercury whose expected tracking accuracy is of the order
of $\simeq 0.1~\textrm{m},~2\times 10^{-4}~\textrm{cm s}^{-1}$. The competing
signatures due to the solar quadrupole $J_2^\odot$, if modelled at the
$\sigma_{J_2^\odot}\simeq 10^{-9}$ level of the latest planetary ephemerides
INPOP17a, are nearly 10 times smaller than the relativistic gravitomagnetic
effects. The position and velocity vectors $\mathbf{r},~\mathbf{v}$ of Mercury
and Earth are changed by the solar Lense-Thirring effect by about
$10~\textrm{m},~1.5~\textrm{m}$ and $10^{-3}~\textrm{cm
s}^{-1},~10^{-5}~\textrm{cm s}^{-1}$, respectively, over 2 yr; neglecting such
shifts may have an impact on long-term integrations of the inner solar system
dynamics over $\sim\textrm{Gyr}$ timescales.
