Solution (source code)

= Solution

Put $\tau=\Gamma t$, $r=r_D$ and $\delta=\delta_D$. Two indistinguishable paths reach the wrong-sign <kaon>-<pion> final state: a direct doubly <Cabibbo suppressed> <decay amplitude> $r e^{-i\delta}g_+$ and a <neutral meson mixing> amplitude followed by the favoured decay, $g_-$. They must be added before taking the absolute square:
$$
\mathcal A_{\mathrm{WS}}=r e^{-i\delta}g_++g_-.
$$
Direct complex-trigonometric multiplication gives
$$
|g_+|^2=\frac{e^{-\tau}}2(\cosh y\tau+\cos x\tau),\quad |g_-|^2=\frac{e^{-\tau}}2(\cosh y\tau-\cos x\tau),\quad g_+^*g_-=\frac{e^{-\tau}}2(\sinh y\tau+i\sin x\tau).
$$
Therefore
$$
\boxed{|\mathcal A_{\mathrm{WS}}|^2=e^{-\tau}\left[\frac{r^2}{2}(\cosh y\tau+\cos x\tau)+r(\cos\delta\sinh y\tau-\sin\delta\sin x\tau)+\frac12(\cosh y\tau-\cos x\tau)\right]}.
$$
The three terms are direct decay, <quantum interference> and decay after mixing. In particular, the minus sign multiplying $\sin\delta\sin x\tau$ follows from the source's $+i\sin$ convention and its definition $r e^{-i\delta}$; importing another convention without transforming $\delta$ would change a physical prediction incorrectly. The common exponential accounts for survival before decay. The expression is a decay-rate density up to an overall normalization, rather than a normalized cumulative probability.