The three galaxies in the Draco Triplet appear from our vantage point to be in a line, but the effect is thought to just be a line-of-sight coincidence. At the top of the picture is NGC5985, a spiral galaxy, which is approx. 120 million light years away. In the middle NGC5982, an elliptical galaxy, which is 130 million years away. And at the bottom NGC5981, an edge on spiral galaxy, is 100 million light years away.
For more info. see the Wikipedia NGC5982 Wikipedia and Webb Deep-Sky Society webpages.