The first person shakes hands with 3 people.

The second person shakes hands with 3 people as well, but we already counted his shake with the first person. The third person shakes hands with 3 people, but we already counted his shake with the first two people. We have already counted all of the shakes that the last person had because he shook hands with everyone else.

So the total number of handshakes was 3 + 2 + 1 = 6.

The second person shakes hands with 3 people as well, but we already counted his shake with the first person. The third person shakes hands with 3 people, but we already counted his shake with the first two people. We have already counted all of the shakes that the last person had because he shook hands with everyone else.

So the total number of handshakes was 3 + 2 + 1 = 6.