Welcome to our forum.
Is that psc glued or threaded on, if glued it might be a tough one..
Are you sure it's glued and not siliconed? I'm not sure why that wud be glued into place
What is the inside measurement? Look like 2" if that's what it is you could glue inside with an elbow to the coupling
You might pick up a street elbow 90* and see if it's a good fits inside then go from there. Worse case it leaks, best case it works.. You will need to tie into that other pipe which might be difficult, think about bringing that other psc up to meet with the other section, so you can keep the elbows at a minimum.
To me the photo of that other psc of pipe looks lower prolly just an illusion but you need to tie into that some how.
That's half a union, that's SCREWED in.............just like the OTHER union for the other pipe going into the pump. If you unscrew it and take it into your local spa store (that has a service department) they can probably match it up with the correct other half...or they'll have an entire new union you can use. Don't waste your time at home depot or a plumbing supply. They ,might have an entire union (unlikely), but no way will they have just the half you need.