First, we need to calculate the number of pairs of people, that is the number of ways we can choose 2 people out of 500 people. That is 500 choose 2 because the order of people chosen is not significant in our case. For example, choosing the first person then the third person for a pair is the same pair as choosing the third person then the first person. Note that 500 chose 2 is equal to (500!)/(2!(500-2)!) = 124,750 so that is the number of pairs of people. The probability of a pair becoming good friends is the number of pairs of good friends divided by the number of pairs of people so multiplying the probability by the number of pairs of people yields the number of pairs of good friends. That is 1/10,000 •124,750 = 12.475. Following conventional rounding, the expected number of pairs of good friends after 1 hour together is 12. Since each person can make no friends after having a good friend, no person has two good friends. Then since each pair has two different people with no other good friends, we have (12 pairs)•(2 people/1 pair)= 24 people. The expected number of good friends after 1 hour together is 24.
Feel free to message me if you are still confused.