5. Let $P$ be a moving point on the edge $A B$ of the cube $A B C D-A^{\prime} B^{\prime} C^{\prime} D^{\prime}$. Then the minimum value of the dihedral angle formed by the plane $P D B^{\prime}$ and the plane $A D D^{\prime} A^{\prime}$ is ( ).
(A) $45^{\circ}$
(B) $\arctan \frac{\sqrt{2}}{2}$
(C) $\arctan \sqrt{2}$
(D) $\arctan \frac{\sqrt{2}}{4}$
5. B.

As shown in Figure 3, extend $A^{\prime} A$ and $B^{\prime} P$ to intersect at point $E$. By the properties of the cube, we know that $P A \perp$ plane $A E D$. Draw $A F \perp E D$ at $F$, and connect $P F$.
By the theorem of three perpendiculars, we know that $P F \perp E D$.
Therefore, $\angle P A F$ is the plane angle of the dihedral angle formed by plane $P D B^{\prime}$ and plane $A D D^{\prime} A^{\prime}$.
Let $P A=x$, then $A E=\frac{x}{1-x}$.

In the right triangle $\triangle A E D$, we have
$$
A F=\frac{x}{(1-x) \sqrt{1+\left(\frac{x}{1-x}\right)^{2}}}=\frac{x}{\sqrt{(1-x)^{2}+x^{2}}} .
$$

Thus, $\tan \angle P F A=\frac{x}{\frac{x}{\sqrt{(1-x)^{2}+x^{2}}}}$
$$
\begin{array}{l}
=\sqrt{(1-x)^{2}+x^{2}} \\
=\sqrt{2\left(x-\frac{1}{2}\right)^{2}+\frac{1}{2}} \geqslant \frac{\sqrt{2}}{2} .
\end{array}
$$

The equality holds if and only if $x=\frac{1}{2}$.