The frequency of an allele can be calculated by dividing the number of times the allele can be observed in a population by the total number of duplicates of alleles at the specific locus in that population. But in the given question, we already have the values of allele a and b. In this case, we can just sum up the values we already have (0.4 and 0.3) and see what's missing to complete 1.
1(p)= a+b+c
1= 0.4+0.3+c
In this case, 0.4+0.3 is equal 0.7. So we need 0.3 to complete 1.
1=0.4+0.3+0.3
c is equal 0.3.