The frequency p of the yellow (A) allele is p= 0.3
The frequency q of the blue (a) allele is q= 0.7
Hardy–Weinberg equilibrium, states that allele and genotype frequencies in a population will remain constant from generation to generation. Equilibrium is reached in the absence of selection, mutation, genetic drift and other forces and allele frequencies p and q are constant between generations. In the simplest case of a single locus with two alleles denoted A and a with frequencies f(A) = p and f(a) = q, the expected genotype frequencies under random mating are f(AA) = p² for the AA homozygotes, f(aa) = q² for the aa homozygotes, and f(Aa) = 2pq for the heterozygotes.
p²+2*p*q+q²= 1 p+q= 1 q= 1-p
yellow (p²)= 9%= 0.09 p= √0.09= 0.3
green (2*p*q)= 42%= 0.42
blue (q²)=49%= 0.49 q=1-0.3= 0.7 or q= √0.49= 0.7