Here's how it works:
* A young, forming star (the proto-sun) is surrounded by a disc of dust and gas.
* A passing star comes close enough to the proto-sun's gravitational influence.
* The passing star's gravity pulls on the dust and gas around the proto-sun, drawing it out into a stream.
* Some of this pulled material condenses to form planets.
However, the encounter hypothesis is no longer widely accepted by scientists. Here's why:
* It's statistically unlikely: The chances of a star passing close enough to a forming solar system to have this effect are extremely low.
* It doesn't explain key characteristics: The encounter hypothesis struggles to explain the observed angular momentum of planets, the distribution of elements, and the general structure of our solar system.
The currently accepted theory of solar system formation is the "nebular hypothesis". This model explains the formation of our solar system from a giant cloud of gas and dust called a nebula. Over millions of years, the nebula collapsed under its own gravity, forming the sun at its center and a rotating disk of material that eventually formed the planets.
While the encounter hypothesis is an interesting idea, it's not considered a viable explanation for the formation of our solar system.