As far as I know, the Compound Adder has the carry-out bit as the MSB S[n].
Then why in the recitation the carry-out bit was S[p]? It is not the MSB.
(It is marked in yellow)
D is the carry out of the summation of the right parts of A and B <A[p-1:0]>+B[p-1:0]>
all the bits that are left to D are 0.