Substituting eqn (5.9) into the time-dependent equation gives $$ i\hbar \sum_n \dot c_n(t) |u_n\rangle e^{-iE_nt/\hbar} = \sum_n V(t) |u_n\rangle e^{-iE_nt/\hbar}c_n(t) \tag{5.10} $$ Now take the scalar product with $|u_p\rangle$ to find $$ i\hbar \dot c_p(t) = \sum_n V_{pn}(t) e^{-i\omega_{pn}t}c_n(t) \tag{5.11} $$ where the matrix element is $$ V_{pn}(t) = \left< u_p \middle | V \middle | u_n \right> \tag{5.12} $$
I am sure that there must be a simple reason for this that I am missing but I have tried to find one to no avail. I am trying to understand why applying the inner product in eqn 5.11 causes only the left hand side sum to vanish via the Kronecker delta. It seems to me that the sum on both sides should collapse to the cases in which $n=p$.