Tumor verified by a thoracic surgeon to be in a location that will permit sublobar resection No prior intra-thoracic radiation therapy; NOTE: previous radiotherapy as part of treatment for head and neck, breast, or other non-thoracic cancer is permitted so long as possible radiation fields would not overlap; previous chemotherapy or surgical resection specifically for the lung cancer being treated on this protocol is NOT permitted; no prior lung resection on the ipsilateral side No prior mediastinal or thoracic radiotherapy Prior breast or thoracic radiation therapy (RT) for any condition Patients must have histologic proof of malignancy suitable for thoracic radiation therapy Received more than Gy of radiation in the thoracic region within weeks prior to study enrollment Prior treatment with radiation to the thoracic region Prior radiotherapy or radiosurgery (including prophylactic cranial radiation and/or thoracic radiation) must have been completed at least weeks prior to randomization PHASE II INCLUSION CRITERIA: Prior radiotherapy or radiosurgery (including prophylactic cranial radiation and/or thoracic radiation) must have been completed at least weeks prior to randomization Prior thoracic radiotherapy Patients must be registered on study no earlier than days and no later than days prior to Step registration after completing chemotherapy, Note:\r\n* Post-chemotherapy restaging imaging must be completed no earlier than days prior to Step registration\r\n For patients with limited-stage small cell lung cancer who receive thoracic radiotherapy concomitant with chemotherapy, patients must be registered on study no earlier than days and no later than days prior to Step registration after completing thoracic radiotherapy\r\n For patients with extensive-stage small cell lung cancer who are being considered for consolidative thoracic radiotherapy after chemotherapy, concomitant administration of consolidative thoracic radiotherapy and protocol-specified prophylactic cranial irradiation with or without hippocampal avoidance is permitted; if consolidative thoracic radiotherapy is performed prior to study registration, then patients must be registered on study no earlier than days and no later than days prior to Step registration after completing thoracic radiotherapy No prior chemotherapy or thoracic radiotherapy for lung cancer Prior radiotherapy to thoracic area. Prior thoracic radiation is allowable if degree of overlap with the esophageal radiotherapy treatment is deemed to be safe by the treating radiation oncologist The patient will receive thoracic stereotactic body radiotherapy at MD Anderson. Patients with a history of prior thoracic radiation > gray (Gy) No prior breast or thoracic radiotherapy Subjects must not have prior breast or thoracic radiotherapy No prior mediastinal or thoracic radiation Prior thoracic irradiation previous unilateral thoracic surgical procedure or trauma The vertebral body site to be treated must be located from the second to the twelfth thoracic vertebrae (T-T) Patients who have received thoracic radiation > gray (Gy) within six months of the first dose of pembrolizumab Patients with malignant celiac nodes are eligible if the primary lesion is in the mid-thoracic or distal thoracic esophagus or it is involving the gastroesophageal junction Has been treated with anti-cancer therapy or thoracic radiation therapy within days Prior breast or thoracic radiation therapy (RT) for any condition Radiologic workup must demonstrate that the thoracic disease is confined to only one hemi-thoracic cavity and must be deemed potentially resectable by the surgical team Patients with a history of non-breast malignancies are eligible as long as they have not received prior radiotherapy to the thoracic region, and have a greater than year interval without evidence of recurrence Prior thoracic radiation therapy preventing hemithoracic pleural IMRT Prior systemic chemotherapy, major surgery, or thoracic radiation within weeks of study initiation. Measurable disease as assessed by modified RECIST for MPM for thoracic disease (Appendix A) and RECIST . for extra-thoracic disease (Appendix B). Subject has an air leak ? mL/min, as measured by a digital thoracic drainage system (DTDS) Participants must initiate study treatment with thoracic radiation therapy =< weeks ( days) from the last dose of platinum-based first line chemotherapy;\r\n* Thoracic radiation therapy must not be administered < weeks ( days) from the last dose of platinum-based first line chemotherapy\r\n* Ipilimumab/nivolumab study therapy must not be administered < days and not more than days from the last dose of thoracic radiotherapy Prior breast or thoracic radiation therapy (RT) for any condition Participants with prior mediastinal or thoracic radiotherapy. Prior tangential RT to prior breast cancer is acceptable. Treatment with thoracic or mediastinal radiotherapy within weeks prior to initiation of study drug Prior systemic chemotherapy (for lung cancer) and/or thoracic/neck radiotherapy for any reason and/or surgical resection of present cancer Patient is not a candidate for or declines consolidative thoracic radiotherapy. Patients receiving any systemic chemotherapy or thoracic radiotherapy within weeks prior to study treatment. Patients previously treated with radiation therapy to the thoracic or lumbar spinal levels of involved disease will not be included Patients cannot have more than lung lesions\r\n* Patients with a single lung lesion other than the primary tumor and no other thoracic or extra-thoracic disease will not be eligible Prior thoracic radiotherapy that would lead to overlap with the current radiation treatment field Patients who cannot tolerate thoracic radiotherapy or targeted therapy Prior chemotherapy, radiation for any malignancy in which they received any thoracic radiotherapy Deemed surgically resectable by a thoracic surgeon Patients must have a prior diagnosis of cancer inside the thoracic cavity; both primary thoracic malignancies (such as lung cancer) as well as metastatic lesions (such as metastatic breast cancer or colorectal cancer to the lungs) are allowed; patient must have pathologic confirmation of the recurrent thoracic tumor, or have an enlarging thoracic mass (as seen on two computed tomography [CT] scans at least weeks apart, with either a > % or > mm increase in longest dimension) Patients that have had prior ipsilateral chestwall/thoracic radiation Evaluation by a thoracic surgeon and a radiation oncologist within months of registration Prior thoracic radiotherapy Has received prior chemotherapy for any malignant disorder, thoracic radiation therapy or prior surgical resection of an esophagogastric tumor Patients with uncontrollable progression of extra-thoracic disease will be excluded from study Tumor verified by a thoracic surgeon to be in a location that will permit a sublobar resection Patient participants will have an appointment in the Thoracic Oncology Program at the Brigham and Womens Hospital Patients must have surgically resectable disease treatable by esophagectomy, as assessed by a thoracic surgeon Tumors with significant involvement of the proximal stomach which, in the opinion of the treating thoracic surgeon, would require an esophagogastrectomy Diagnosed with breast, GYN, GI, GU, or thoracic cancer Unable to start nintedanib/placebo treatment between - weeks after completing the last dose of thoracic radiation Seen at Supportive Care, cardiopulmonary center, thoracic radiation oncology or thoracic medical oncology Patients who have known metastatic disease or other bulk disease in the thoracic or cervical regions Adult patients scheduled for thoracic surgery Prior malignancy in which they received any thoracic radiotherapy unless the treating physician considers it unlikely to impact the clinical outcome of the patient Patients whove received a therapeutic course of antibiotics within days prior to thoracic surgery Prior chemotherapy or thoracic radiation within the past years Prior thoracic radiotherapy directed to the ipsilateral lung or prior surgical wedge resection in the involved lobe Patients getting a planned wedge resection as the only thoracic resectional procedure Prior thoracic surgery on the same side of the lung as the SPN. Previous thoracic surgery Histologic proof of malignancy suitable for thoracic radiation therapy Patient must have been valuated by a thoracic radiation oncologist within the past weeks and deemed an appropriate candidate for stereotactic ablative radiotherapy (SABR) Patients with thoracic disease to be treated using radiotherapy will be eligible for this study Patients must be planned for at least Gy of thoracic radiation Patients who are seen by members of the Thoracic Surgical oncology Group at Vanderbilt Ingram Cancer Center for their initial surgical consultation