How to connect pipes when the distance between them is odd length?

I wanna connect these two pipes but the distance between them is like 9.858 inches or something which obviously there is no pipe made in that size. How would I connect them?