Collision of galaxies may have spurred our solar system's formation