Solution (source code)

= Solution

Fix $\delta>0$ and choose
$$
\tau_n=\exp\{n(D(P\Vert Q)-\delta)\}.
$$
Under $P$, the <weak law of large numbers> makes the normalized log likelihood ratio converge in probability to $D(P\Vert Q)$, so $P^{\otimes n}(B_n(\tau_n))\to1$. On this <Neyman-Pearson decision region>,
$$
Q^{\otimes n}\leq\tau_n^{-1}P^{\otimes n},
$$
and hence
$$
\beta_n\leq e^{-n(D(P\Vert Q)-\delta)}.
$$
Letting $\delta\downarrow0$ proves the direct bound.