This is scary. I think I figured it out on my own at Home Depot. The key is a short 90 degree "street" elbow. The street elbow is female on one end and male on the other. Because it's short, you get about an inch longer to work with on both ends. So if I cut out that last elbow going down to the tank, I should be able to use couplers to lengthen the pipes. If I get in a bind (things not exactly matching up), I can use a flexible coupler. I was confident enough that I bought the parts. If all goes well (i.e., the tank can be repaired), maybe I'll have good news to report soon with pictures.