Final answer:
After nuclear fusion stops in a star like the Sun, the outer layers expand and become a red giant, then are ejected forming a planetary nebula, and the core becomes a white dwarf.
Step-by-step explanation:
When nuclear fusion reactions stop in a star similar to our own Sun, several changes occur in succession. Initially, the star expands and forms a red giant, as the hydrogen and helium in shells around the core fuse and cause the outer layers to swell. Over time, the star emits more energy, leading to further growth and an increase in luminosity. During this phase, the core is contracting under gravity, which causes the temperature to rise.
Once the helium is exhausted and no other fusion reactions can occur to sustain the star, the core begins to shrink and heat up. This intense heat generates powerful stellar winds and ultraviolet radiation, which then interacts with the previously ejected material to form a planetary nebula. Following these events, the core stabilizes into a white dwarf, a densely compact stellar remnant.
In summary, the options presented in the question represent consecutive steps in the process of stellar evolution. Therefore, the correct answer that describes what happens to the star's outer layers after nuclear fusion ceases in a star like our Sun is that they expand to become a red giant, then are ejected into space, forming a planetary nebula, and lastly, what's left of the core collapses inward to become a white dwarf.