Let us consider the Erdos number of A,B,C,D,E,F,G,H be a,b,c,d,e,f,g,h where f is the min, a is infinity.
At the end of 3rd day, F co authored with A and C. Since F has min Erdos number ,the values of c,a will change to f+1 and the Erdos number of F will remain the same. [Because according to Erdos principle if a person co-authors with some one who has higher Erdos number then the Erdos number of co-authors will be min Erdos value + 1]
Average of the mathematicians is 3
Sum of the Erdos number of eight mathematicians=24
Erdos number at the third day:f+1,b,f+1,d,e,f,g,h
At the end of the fifth day, F co-authors with E thereby changing the average to 2.5 and the Erdos number of rest of the mathematicians remain unchanged.
Sum of the Erdos numbers of eight mathematicians=20
So here the difference of 4[24-20] arose, which means e will be f+5 initially and changed to f+1 after co-authoring with F.
So the Erdos number at the third day:f+1,b,f+1,d,f+5,f,g,h
At the end of the third day, five mathematicians had the same Erdos number and the rest had distinct Erdos number from each other.
It cannot be f+5 because then there will be two mathematicians with the same Erdos number f+1.
So five mathematicians will have f+1, one with f+5,one with f, one with some different value say x
5(f+1)+f+5+f+x=24
7f+x=14
The only value which satisfies the above equation is f=1,x=7
Erdos number at the end of fifth day,f+1,b,f+1,d,f+1,f,g,h
On tabulating, we get

Hence the person having the largest Erdos number at the end of the conference must have had Erdos number 7 . Hence option B.