If the purple color is dominant over the white color, this means that whenever you can find a P allele (for purple), you will see the color purple. Even if the flower is Pp (having alleles for both colors), the purple allele will be dominant over the white allele and the color expressed on the flower will be purple. This means that PP and Pp are genotypes that will lead to the color purple. This also means that, in order to have a white flower, you need to have only alleles for white flowers. So the only genotype that will result in white flowers is pp.
With that in mind, knowing that the offspring of the crossing presented flowers from both colors, we can say for sure that we found flowers with pp genotype (as it is the only option or white flowers). And, in order to have two recessive alleles, the plant must receive one from each parent. So we can say that both parents had at least one recessive allele (p) too, so they could pass it down to he offspring and produce white flowers (pp). As both parents are purple, we also can say that they must have at least one dominant allele (P) too. So, as both parents have dominant and recessive alleles, we can say that they are both heterozygous, as shown in the following Punnet square:
Therefore, we can say for sure tha the genotypes of the parents are Pp and Pp.
The correct answer is D. Pp and Pp.