If you can't unscrew the drain flange from the T-connector, use a reciprocating saw with a metal-cutting blade and cut the drain assembly away just above the T-connector.
Unscrew the nut that connects the drain to the flange using an adjustable wrench if you are replacing the pop-up drain. Then remove the drain flange from the T-connector.
The main source of these failures are vortices existing, in front of Tee-Junctions of entering headers of superheaters and reheaters, caused by the complex flow conditions in the headers.