Could be an optical illusion, and they are in reality light years from each other. Along the lines of a eclipse scenario. But it’s an interesting picture without question.
The Milky Way galaxy is about 150 million light years across and takes about 250 million years for the Earth/Sun to rotate once.
The pictured Galaxy arms are distorted so they are close, but close can still be really far.