5. Given the rectangular prism $A B C D-A^{\prime} B^{\prime} C^{\prime} D^{\prime}$, how many pairs of skew lines are there among the following twelve lines: $A B^{\prime}, B A^{\prime}, C D^{\prime}, D C^{\prime}, A D^{\prime}, D A^{\prime}$, $B C^{\prime}, C B^{\prime}, A C, B D, A^{\prime} C^{\prime}, B^{\prime} D^{\prime}$?
A. 30
B. 60
C. 24
D. 48
The number of lines intersecting with $A B^{\prime}$ is 4, the number of lines coplanar (intersecting or parallel) with it is 2, and the number of skew lines with it is 5:
$$
C D^{\prime}, D A^{\prime}, B C^{\prime}, B D, A^{\prime} C^{\prime} \text {. }
$$

Thus, the number of pairs of skew lines is $\frac{12 \cdot 5}{2}=30$. Therefore, the answer is $A$.