What is this pipe coming from the basement wall?
It appears to be abandoned hard pipe for your well. I used to run hard pipe to the well head and convert to poly at the cap so the jet or foot can be pulled up. Someone may have changed to submersible as I did in my current home because submersible pumps are much more efficient, when doing this they may have abandoned the original plumbing as it was easier than removal. I would cap them so they don’t drip. They can be cut off and plugged but if they don’t bother you you may want to leave them in place just capped.