Let's say the 5 people are labelled A, B, C, D, E.
PART A
1) A shakes hands with B, C, D, E then moves away from the group (4 handshakes)
B shakes hands with C, D and E then moves away from the group (3 handshakes)
C shakes hands with D and E then moves away from the group (2 handshakes)
D shakes hands with E (1 handshake)
3) 10 handshakes in all. Everyone has shaken hands with everyone else.
2) Example: take C: C shook hands with A when before A moved away from the group; C shook hands with B before B moved away from the group. C proceeds to shake hands with D and E before leaving the group. This example shows that each person shakes hands with 4 others.
PART B
1) Assemble participants in arbitrary order. The first in order shakes hands with n-1 others then leaves the group.
The next in order shakes hands with n-2 others and leaves the group.
And so on until only two remain to shake hands. The exercise has then been completed.
2) Each participant shakes hands with n-1 others. When n=5 we get 4 handshakes, which ties in with Part A.
3) The summation of handshakes is n-1+n-2+n-3+...+2+1, which can be written (n-1+1)+(n-2+2)+(n-3+3)+... There are (n-1)/2 of these pairings so the summation is n(n-1)/2. If n=5 we get 5*4/2=10 handshakes which ties in with Part A. If n=6 we have 5+4+3+2+1=15=(6-1)*6/2=30/2. The counting formula is n(n-1)/2.