So let's call the allele that is dominant for purple stems is P, and the recessive allele yielding green stems is p. And let's say that the allele that is dominant for red fruit is R and the recessive allele for yellow fruit is r.
The two plants are each heterozygour for both traits, meaning that the cross is going to be:
PpRr x PpRr
So let's setup a Punnet Square:
The genotypic ratios (alleles) and phenotypic ratios are as follows:
PPRR (Purple stem, Red fruit):
PpRR (Purple stem, Red fruit): or
ppRR (Green Stem, Red fruit):
PPRr (Purple stem, Red fruit): or
PPrr (Purple stem, Yellow fruit):
PpRr (Purple stem, Red fruit): or
pprr (Green stem, Yellow fruit):
ppRr (Green stem, Red fruit): or
Pprr (Purple stem, Yellow fruit): or
So then we take the like phenotypic ratios and add them together:
Purple stem, Red fruit:
Green stem, Red fruit:
Purple stem, Yellow fruit:
Green stem, Yellow fruit: