  We investigate the decays of $B^0 \to K^0 X(3872)$ and $B^+ \to K^+ X(3872)$
based on the picture where the $X(3872)$ resonance is strongly coupled to the
$D\bar{D}^* + c.c.$ channel. In addition to the decay mechanism where the
$X(3872)$ resonance is formed from the $c\bar{c}$ pair hadronization with the
short-distance interaction, we have also considered the $D\bar{D}^*$
rescattering diagrams in the long-distance scale, where $D$ and $\bar{D}^*$ are
formed from $c$ and $\bar{c}$ separately. Because of the difference of the mass
thresholds of charged and neutral $D\bar{D}^*$ channels, and the rather narrow
width of the $X(3872)$ resonance, at the $X(3872)$ mass, the loop functions of
$D^0\bar{D}^{*0}$ and $D^+\bar{D}^{*-}$ are much different. Taking this
difference into account, the ratio of $\mathcal{B}[B^0\to
K^0X(3872)]/\mathcal{B}[B^+ \to K^+ X(3872)] \simeq 0.5$ can be naturally
obtained. Based on this result, we also evaluate the decay widths of $B_s^0 \to
\eta(\eta') X(3872)$. It is expected that future experimental measurements of
these decays can be used to elucidate the nature of the $X(3872)$ resonance.
