Final answer:
After shedding a planetary nebula, the surface of a star becomes hotter due to the compression of stellar material that causes the core to shrink and heat up, leading to temperature increases on the star's surface.
Step-by-step explanation:
The surface of a star becomes hotter after the star sheds its outer layers and forms a planetary nebula. This increase in temperature is mainly due to the compression of stellar material. When nuclear energy generation in the star's core stops, the core begins to shrink and heat up as it gets further compressed. Without another type of fusion to stop this compression in low-mass stars, the star contracts and turns very hot, reaching surface temperatures that can be as high as 100,000 K. This intense heat creates strong stellar winds and emits ultraviolet radiation, which affect the surrounding nebula.
Therefore, the correct answer to why the surface of a star is hotter after the star sheds a planetary nebula is B) Compression of stellar material. This process leads to a significant increase in the star's surface temperature.