Answer:
1. Solar Nebula
2. The Sun
3. Planetesimals
4. Inner planets
5. Outer planets
Explanation:
A star is formed in a molecular cloud of gas and dust, mainly composed of hydrogen and helium. The Nebular Theory establishes, for the formation of the solar system, that the cloud starts to collapse under its own gravity when it receives a shock wave from a near event, for example, a supernova explosion. That results in the cloud breaking in small pieces, and those pieces constitute a possible future star.
Then it begins to accrete and rotate as a consequence of the angular momentum. In the center of that disk when it reaches the necessary temperature and pressure a protostar will born.
Around the star, in this case the Sun, fragments of dust combine until they get a meaningful size (planetesimals). According with chemical distribution on the disk of the future solar system, rocky and iron were closer to the Sun and gasses and ice were in the outer part of disk. That may explain why the inner planets are terrestrial and the outer planets are giant gasses.