There are $5$ people in the room
No. of people involved in one handshake $= 2$
So, we will use combination over here to find the no. of possible handshakes $^nC_r = \frac{n!}{(n-r)!r!}.$
Here$,n = 5,r = 2$
Now, $^5C_2 = \frac{5!}{3!2!} = \frac{5.4.3!}{3!.2.1} = 10$
Hence the maximum number of distinct handshakes that can happen in the room with $5$ people in it is $10.$
So, the correct answer is $(B).$