Solution:

Construct a set {Pi} of people as in the hint. This set has the property that for each i, either
1) Pi is friends with every Pj where j>i. (Pi is gregarious.)
or
2) Pi is not friends with any Pj where j>i. (Pi is a hermit .)
Now either the set of gregarious people is infinite or the set of hermits is infinite, because their union is an infinite set. Suppose the set of gregarious people is infinite. Then for each pair of people in the set {Pi,Pj} where i < j, we know that Pi is friends with Pj, by definition of gregarious. Similarly, if the set of hermits is infinite, they yield an infinite set of people, no pair of which are friends.

Perceptive readers will notice that I need to use the axiom of choice here. For them, here is a solution that explicitly uses that axiom.

Given the infinite set of people at the party, there is a choice function, c, defined on the set of nonempty subsets of people such that c(A) is an element of A. Let P1 = c(set of all people at party). Define F1 and N1 to be the set of friends and non-friends of P1, respectively. Let S1= F1 if that set is infinite. Otherwise let S1= N1. In general suppose {P1,...,Pn} and {S1,...,Sn} have been defined. Let Pn+1=c(Sn), and define Sn+1 to be the set of people in Sn who are friends with Pn+1 if that set is infinite. Otherwise let Sn+1 be the set of people in Sn who are not friends with Pn+1. By the principle of recursive definition (see, e.g., Topology by James Munkres), this gives us a countably infinite set {Pi}. Now proceed as above.