1 is outside the sum, and it should be the identity operator, not a number (but this is a very common abuse of notation).
An observable (Hermitian operator) ##\xi## can be decomposed as a sum ##\xi = \sum_r c_r |r\rangle \langle r|## of its orthonormal eigenvectors ##\{ |r \rangle \}## written as projection operators ##|r\rangle \langle r|##, and eigenvalues ##c_r##.
What Dirac is doing is the converse. How can we write each projection operator as a function of ##\xi## ? Let's first look at $$\chi_r (\xi) = \prod_{q \neq r} ( \xi - c_q \hat{1}), $$ where ##\hat{1}## is the identity operator. Each term in the product annihilates ## | q \rangle ## i.e. ## (\xi - c_q \hat{1} )|q \rangle = 0##. So it is easy to see in the basis in which ## \xi ## is diagonalized that ##\chi_r (\xi)## has a bunch of zeros in the diagonal. In fact, the only vector not annihilated by ##\chi_r (\xi)## is ##|r\rangle. ## Moreover, $$\chi_r (\xi) = \prod_{q \neq r} (c_r - c_q)|r\rangle \langle r|.$$ Note that ##|r\rangle \langle r|## could be inside or outside the product. It doesn't matter, because ##(|r\rangle \langle r|)^2 = |r\rangle \langle r| ##. Therefore, \begin{aligned} \frac{\chi_r (\xi) }{\chi_r (c_r)} &= |r \rangle \langle r| \\ \sum_r \frac{\chi_r (\xi) }{\chi_r (c_r)} &= \hat{1}, \end{aligned} where I used the fact that ##\{ |r\rangle \}## forms a resolution of the identity in the last line.
Perhaps an easier way to say all of this is that, whenever we have the resolution of the identity ##\sum_r |r\rangle \langle r| = \hat{1}##, we can expand any vector in the ##|r \rangle ## basis by inserting the identity $$ |P\rangle = \hat{1} |P\rangle = \sum_r \langle r|P \rangle |r\rangle. $$