5. As shown in Figure 2, two isosceles right triangles $A B P$ and $C D P$ are joined together to form a concave quadrilateral $A B C D$. When the triangle $C D P$ is rotated around point $P$ by an acute angle $\theta$, the relationship between $A C$ and $B D$ is ( ).
(A) $A C>B D$
(B) $A C=B D$
(C) $A C<B D$
(D) Cannot be determined, depends on $\theta$
5. B.

In Figure 2, connect $A C$ and $B D$.
When the triangular board $C D P$ rotates around point $P$ by an acute angle $\theta$, from $\triangle A B P$ and $\triangle C D P$ being isosceles right triangles, we have
$$
\begin{array}{l}
A P=B P, C P=D P . \\
\text { By } \angle A P C=\angle B P D \\
\Rightarrow \triangle A C P \cong \triangle B D P \Rightarrow A C=B D .
\end{array}
$$