Lets understand this in a calculative way,
Let the parents genotype be RR and Rr
The offspring’s produced are – RR, Rr, Rr, RR, Thus all the offsprings are white as r is recessive, for producing a red flower the offspring must have “rr” genotype.
Now if parents have Rr and rr genotype , then the offspring would have Rr, rr, rr, Rr giving two white and two red flower. Of the second case may be where both the parent white flower are the carrier with genotype “Rr”
Thus in order to produce red flower the parents with following genotypes is necessary –
a) Both parents having Rr
b) One parents with rr and the other parent with Rr genotype