I have a house built in 1958 and I'm replacing the bathroom vanity and sink with an IKEA unit that needs plumbing close to the wall. I have a new P trap, but cannot take this old P trap off. It appears to thread directly into a cast iron T inside the wall. It is not a compression fitting like I first thought. I have applied some PB Plaster and tried to unthread it, but it is just getting crushed.
My other option is to cut it off, and try to work with what is sticking out, but it got beat up trying to unscrew it.
Close up of the T, it is one cast part: