The wavelength at which a blackbody spectrum peaks is dependent only on the temperature. The hotter a star is, the shorter wavelength it peaks. Since star C peaks at the same wavelength as star E, it must have the same temperature. But as star C is less luminous than star E, star C must be smaller.
Star D must be cooler than star E because its spectrum peaks at a longer wavelength. Since they are about the same luminosity, star D must be larger.
A continuous spectrum of light from a hot dense source passes through a low-density cloud where individual wavelengths of light are absorbed, the emitted light from the cloud then passes through a prism.
Since the Sun has a low-density gaseous atmosphere surrounding a hot, dense core, it is similar to the bottom scenario shown in the figure. So, the light that was emitted from the core would have some of its light absorbed by the atmosphere, creating an absorption spectrum. Note that although it says "COOL, low-density cloud", the "COOL" is a relative term. The temperature of the atmosphere of the Sun (~6000 Kelvin) is much lower than that of the core (~10 million Kelvin).