3. In the afternoon, 5 classes need to be scheduled: Physics, Chemistry, Biology, and two self-study periods. If the first class cannot be Biology and the last class cannot be Physics, then the number of different scheduling methods is ( ) kinds.
(A) 36
(B) 39
(C) 60
(D) 78
3. B.

The total number of unrestricted arrangements is $\frac{A_{5}^{5}}{2}=60$; the number of arrangements with biology in the first period or physics in the last period is $\frac{\mathrm{A}_{4}^{4}}{2}=12$ each, and among these, the number of arrangements with biology in the first period and physics in the last period is $\frac{A_{3}^{3}}{2}=3$.
Therefore, the number of arrangements that meet the requirements is $60-12 \times 2+3=39$ (ways).