If a single gene Y determinates the colour of the peas than:
YY is dominant homozygous genotype-yellow phenotype
Yy is heterozygous genotype-yellow phenotype
Yy is recessive homozygous genotype-green phenotype.
Hardy-Weinberg equation: p2 + 2pq + q2 = 1, where
p2 is the frequency of dominant homozygous genotype,
2pq is the frequency of heterozygous genotype and
q2 is frequency of recessive homozygous genotype.