12. Given $x, y \in \mathbf{R}_{+}, x \neq 1, y \neq 1$, satisfying: $\log _{2} x=\log _{y} 16, x y=64$. Then $\left(\log _{2} \frac{x}{y}\right)^{2}$ is $(\quad$.
(A) $\frac{25}{2}$
(B) 20
(C) $\frac{45}{2}$
(D) 25
(E) 32
12. B.
$$
\begin{array}{l}
\text { Given } \log _{2} x=\log _{y} 16=\frac{\log _{2} 16}{\log _{2} y}=\frac{4}{\log _{2} y} \text {, } \\
x y=64 \text {, } \\
\left\{\begin{array}{l}
\log _{2} x \cdot \log _{2} y=4, \\
\log _{2} x+\log _{2} y=6 .
\end{array}\right. \\
\text { Therefore, }\left(\log _{2} \frac{x}{2}\right)^{2}=\left(\log _{2} x-\log _{2} y\right)^{2} \\
=\left(\log _{2} x+\log _{2} y\right)^{2}-4 \log _{2} x \cdot \log _{2} y \\
=20 \text {. } \\
\end{array}
$$