The capital letter is your dominant allele and the lowercase letter is your recessive allele.
For complete dominance, if you have a homozygous dominant genotype (aka two capital letters) or a heterozygous genotype (aka one capital, one lowercase), the dominant phenotype will show.
On the other hand, if you have a homozygous recessive genotype (aka two lowercase letters), the recessive phenotype will show.
For your problems:
1) Yellow, Y, is dominant to blue, y. That means both YY and Yy genotypes will display the dominant phenotype, a yellow body.
If there was a yy genotype, then the recessive phenotype, a blue body, would show.
2) Square, S, is dominant to round, s. That means both the SS and Ss genotypes will display the dominant phenotype, a square shape.
If there was a ss genotype, then the recessive phenotype, a round body, would show.