For this you would use a punnet square (ill try my best to show it while typing) heterozygous means different, so with the purple flower youd get the gene shown as Pp and put it into the punnet square
P p P PP Pp p Pp pp
given the possibilities in the punnet square the genes with at least one P is going to be purple and the genes with 2 "p"s are going to be white
so you would have 25% Dominate Homozygous Purple 50% Dominate Heterozygous Purple 25% Recessive Homozygous White
It's like walking ten meters to the left, then walking thirty meters to the right. The result is walking 20 meters to the right. It's the same with force.