This is a Bi-parental hypothesis which was given by the geologist Thomas Chrowder Chamberlin and astronomer Forest Ray Moulton in the year 1905.
This hypothesis says that the origin of the earth and solar system was held by the sun and another star. It says that sun has prominences (solar flares) but these prominences were so strong and big compare to the present time and when a star passed nearby the sun it attracted the sun, and the gases and the liquid came out of the sun which formed small planetesimals. The attracted substance was so much than present day planets sizes, and slowly this formed big nucleus and these nucleus attracted the substance of the sun and planets were formed.
This hypothesis says that initially earth was solid because it was formed by solid and cold planetesimals and the heat inside the earth was formed by the colliding of the planetesimals.