  In this work, a study of the $D_s\bar{D}_s$ interaction and its couplings to
the channels $D\bar{D}$ and $J/\psi \phi$ is performed in a quasipotential
Bethe-Salpeter equation approach. The $D_s^+{D}_s^-$ and $D^+{D}^-$ invariant
mass spectra in three-body $B$ decays are investigated in order to understand
the origin of $X(3960)$, $\chi_{c0}(3930)$, and $X_0(4140)$ structures reported
at LHCb. With the help of effective Lagrangians, the potential kernel can be
constructed with meson exchanges, from which the scattering amplitudes can be
obtained. By inserting it into the three-body decay processes, the invariant
mass spectra can be calculated with an additional Breit-Wigner resonance
introduced. The $D_s^+{D}_s^-$ invariant mass spectrum in the decay process
$B^+\to D^+_sD^-_sK^+$ is well reproduced, and the $X(3960)$ structure can be
explained as a molecular state from the $D_s\bar{D}_s$ interaction. The state
also exhibits as a peak in the $D^+{D}^-$ invariant mass spectrum in the decay
$B^+\to D^+D^-K^+$, however, it is too narrow to reproduce the experimental
structure around 3930~MeV. The dip around 4140~MeV in the $D_s^+{D}_s^-$
invariant mass spectrum can be reproduced by the additional resonance with
interference effect. However, a small bump instead of a dip is produced from
the $D_s\bar{D}_s-J/\psi \phi$ coupled-channel effect, which suggests that the
$X_0(4140)$ cannot be interpreted as the $D_s\bar{D}_s-J/\psi \phi$ coupling in
the current model.
