The dihybrid ratio of genotype in F2 generation can be calculated by using punnet square. For using punnet square let us look from starting. The parents will be RRYY × rryy Games from each parent are RY and ry. Then the F1 generation is RrYy. gametes from F1 will be RY, Ry, rY, ry, crossing these using punnet square will give the F2 generation.
RY
Ry
rY
ry
RY
RRYY
RRYy
RrYY
RrYy
Ry
RRYy
RRyy
RrYy
Rryy
rY
RrYY
RrYy
rrYY
rrYy
ry
RrYy
Rryy
rrYy
rryy
From this square no.of RRYY=1 RRYy=2 RRyy=1 RrYY=2 RrYy=4 Rryy=2 rrYY=1 rrYy=2 rryy=1 Therfore the ratio become 1:2:1:2:4:2:1:2:1