By assumptions, one group contained n+1 students while the whole class contains more than n+2 students. As every two students belonged together into one group, more than one groups with more than one members must have occurred. If some group contained only one student C, this student must have belonged to every group while every other student must have belonged to exactly one group (the one where the student was together with C). But this would mean that there was only one group with more than one student which contained the whole class. Consequently groups with only one member cannot have occurred. Consider two cases.
1) Suppose that there were two groups such that each student belonged to at least one of them. Let C be the student that belonged to both of these two groups and let these groups be {C,A1,…,Ak} and {C,B1,B2,…,Bl}. As every pair of different students is together in exactly one group, the other groups must have had to be of the form {Ai,Bj} where i=1,2,…,k and j=1,2,…,l, whereby all such groups must have occurred. As these groups have to pairwise share one student we have either k=1 or l=1. Let w.l.o.g. k=1. As Laura's group on the day of correlation studies contained n+1 students while n+1>n≥2, this must have been the large group with l+1 students. Thus l=n and the total number of students is n+2. But it is given that the total number of students has to be bigger than that.
2) Suppose now that there were no two groups such that every student belonged to at least one of them. We prove that there was an equal number of students in each group. Let R and S be arbitrary groups formed and let C be an arbitrary student contained by neither of them. Let m be the number of groups that contain C. Each of these m groups has exactly one student in common with R; all these students are distinct as C is the only common member of every two groups containing C. There can be no more students in R because every student in R must belong to some group together with C. Hence R contained exactly m students. Analogously we see that S contains exactly m students. As R and S were arbitrary, it follows that each group contains exactly m students. As on the day of studying correlation there were n+1 students in Laura's group, we have m=n+1. We can find the size of the class by only considering C's groups: there are n+1 of them and each contains n students besides C, whence we have 1+(n+1)n students in total. This is indeed more than n+2 and suits as the answer.