2. Given that quadrilateral $A B C D$ is a square, $P$ is a point on side $B C$, and line $D P$ intersects the extension of $A B$ at point $Q$. If $D P^{2}-B P^{2}=B P \cdot B Q$, then $\angle C D P=$ $\qquad$ .
2.22.5

Let $\theta=\angle C D P=$ $\angle P Q B$. As shown in Figure 8, take a point $T$ on side $A B$ such that $B T=B P$, and connect $D T$ and $D B$.
By symmetry, it is easy to see that
$$
\begin{array}{l}
D T=D P, \\
\angle B D T=\angle B D P, \angle A D T=\angle C D P=\theta .
\end{array}
$$

From the given conditions, we have
$$
\begin{array}{l}
D T^{2}=D P^{2}=B P^{2}+B P \cdot B Q \\
=B T(B T+B Q)=B T \cdot T Q,
\end{array}
$$

which means $\frac{D T}{B T}=\frac{T Q}{D T}$.
Also, $\angle D T B=\angle Q T D$, so $\triangle D T B \sim \triangle Q T D$.
Therefore, $\angle B D P=\angle B D T=\angle D Q T=\theta$.
Thus, $4 \theta=\angle A D C=90^{\circ}$. Hence, $\angle C D P=\theta=22.5^{\circ}$.