In the first generation, there are 490 brown fruit flies and 4 ebony fruit flies. This mean that the frequency of the brown (p2) is 490/490+4 = 0.992 and the frequency of the ebony (q2) is 4/490+4 = 0.008. The frequency of the dominant allele is p=√0.992=0.995 and the frequency of the recessive allele is q=√0.008=0.089. p+q=1 (HW)
The Hardy-Weinberg equilibrium principle describes that frequency of alleles is unchanged through the generations.
Gen 2.
p2= 857/857+7=0.991
q2=7/857+7=0.008
Gen 3.
p2= 612/612+5=0.991
q2=5/612+5=0.008
Gen 4.
p2= 367/367+3=0.991
q2=3/367+3=0.008
Gen 5.
p2= 980/980+8=0.991
q2=8/980+8=0.008
The frequency of alleles is unchanged, population is not evolving.