If someone A has lung cancer
To the best of my knowledge, the only solid organ neoplasm routinely treated by Tx, at the moment, is hepatocellular carcinoma (liver), and even that under very strict conditions. For the rest, transplantation is currently not a standard therapy because of the very real possibility of accelerated growth of micrometastases under severe imunosuppression after the transplant.

And yes... a tumour transplanted into a person would grow, and fast, again because of immunosuppression.

If you're asking this for a practical reason, I'd advise you to talk to the oncologist involved in treatment for a thorough explanation of why this wouldn't work / referral to an applicable study, if there is one.