testing the addition of the pill chemotherapy, cabozantinib, to the standard immune therapy nivolumab compared to standard chemotherapy for non-small cell lung cancer

Conditions: Metastatic Lung Non-Squamous Non-Small Cell Carcinoma; Recurrent Lung Non-Squamous Non-Small Cell Carcinoma; Stage IV Lung Cancer AJCC v8

Summary: this phase ii trial compares cabozantinib alone and the combination of cabozantinib and nivolumab to standard chemotherapy in the treatment of patients with non-squamous non-small cell lung cancer (nsclc). cabozantinib may stop the growth of tumor cells by blocking some of the enzymes needed for cell growth. immunotherapy with monoclonal antibodies, such as nivolumab, may help the body's immune system attack the cancer, and may interfere with the ability of tumor cells to grow and spread. ramucirumab is a monoclonal antibody that may interfere with the ability of tumor cells to grow and spread. chemotherapy drugs, such as docetaxel, gemcitabine hydrochloride, paclitaxel, and nab-paclitaxel, work in different ways to stop the growth of tumor cells, either by killing the cells, by stopping them from dividing, or by stopping them from spreading. giving cabozantinib alone or in combination with nivolumab may be more effective than standard chemotherapy in treating patients with non-small cell lung cancer.

primary objective: i. to determine whether cabozantinib alone, or the combination of nivolumab and cabozantinib, as compared to standard chemotherapy alone, extends progression-free survival (pfs) for this patient population with non squamous nsclc. secondary objectives: i. to determine the overall survival for each arm of the trial. ii. to evaluate the best overall radiographic response rate for each arm of the trial. iii. to evaluate and describe the toxicity profile of monotherapy with cabozantinib, and the combination of nivolumab and cabozantinib in this patient population with non-squamous nsclc. exploratory imaging objectives: i. to describe time point tumor response assessment, overall best response, progression-free survival and overall survival using the conventional response evaluation criteria in solid tumors (recist) 1.1 criteria and the exploratory revised choi criteria with all measurements performed by the central review. ii. to compare the progression-free survival using the recist1.1 imaging response assessment measurements by site study personnel to those performed by central review. exploratory correlative objective: i. to perform correlative biomarker research on tissue and blood biospecimens collected within this trial. outline: step 1: patients are randomized to 1 of 3 arms. arm a: patients receive cabozantinib s-malate orally (po) once daily (qd). cycles repeat every 21 days in the absence of disease progression or unacceptable toxicity. patients may continue to receive therapy after investigator-assessed recist 1.1 defined progression, including stable clinical and performance status and have potential for continued clinical benefit. arm b: patients receive cabozantinib s-malate po qd and nivolumab intravenously (iv) over 30 minutes on day 1. cycles repeat every 21 days in the absence of disease progression or unacceptable toxicity. patients may continue to receive therapy after investigator-assessed recist 1.1 defined progression, including stable clinical and performance status and have potential for continued clinical benefit. arm c: patients receive ramucirumab iv over 30-60 minutes and docetaxel iv over 1 hour on day 1, or docetaxel iv over 1 hour on days 1 and 8, or gemcitabine hydrochloride iv on days 1 and 8, or paclitaxel iv over 3 hours on day 1, or nab-paclitaxel iv over 30 minutes on days 1 and 8. cycles repeat every 21 days in the absence of disease progression or unacceptable toxicity and at the discretion of the treating physician. step 2: patients in arm c experiencing disease progression are assigned to arm z. arm z: patients receive cabozantinib s-malate po qd and nivolumab iv over 30 minutes on day 1. cycles repeat every 21 days in the absence of disease progression or unacceptable toxicity. patients may continue to receive therapy after investigator-assessed recist 1.1 defined progression, including stable clinical and performance status and have potential for continued clinical benefit. patients in all arms undergo echocardiogram (echo) as clinically indicated, computed tomography (ct) throughout the trial, and collection of blood on study. after the completion of study treatment, patients are followed up every 3 months for up to 3 years.

Eligibility criteria:
inclusion criteria: * randomization (step 1): patient must be \>= 18 years of age * randomization (step 1): patient must have pathologically confirmed non-squamous non-small cell lung carcinoma (nsclc). patients with nsclc not otherwise specified (nos) are eligible. mixed tumors will be categorized by predominant cell type. if small cell elements are present, the patient is ineligible * randomization (step 1): patient must have metastatic stage iva or ivb disease (includes m1a, m1b, and m1c), according to the 8th edition of the lung cancer tnm classification system. recurrent metastatic nsclc ineligible for curative therapy (in the treating investigator's opinion) is also allowed * randomization (step 1): patient's tumor must be known negative for egfr tyrosine kinase inhibitor (tki) sensitizing mutations (for example at a minimum, negative for egfr exon 19 deletions, egfr exon 20 insertions, and exon 21 l858r, l861q mutations ) and negative for alk gene rearrangements (by fluorescence in situ hybridization \[fish\], next generation sequencing \[ngs\], or immunohistochemistry \[ihc\]) by routine clinical laboratory improvement amendments (clia)- or food and drug administration (fda)-certified clinical testing methods. clia or fda approved circulating tumor deoxyribonucleic acid (dna) testing is acceptable as an alternative to tissue testing * randomization (step 1): patient must have radiographic and/or clinical progression (per local investigator assessment) following one, but only one, line of platinum-based chemotherapy and one, but only one, line of prior checkpoint inhibitor (anti-pd-1 or pd-l1) immunotherapy, either concurrently or sequentially in either order. a minimum of two doses of prior immunotherapy is required. only one prior line of therapy is allowed if patients received chemotherapy and immunotherapy together (patients may not receive subsequent single agent chemotherapy), and greater than two prior lines of therapy are not allowed. * note: lines of therapy are defined by clinical or radiographic progression. for patients with recurrent metastatic nsclc following treatment for stage 1-3 nsclc, platinum-based chemotherapy received within 12 months of recurrence and/or immunotherapy received within 6 months of recurrence will meet the requirement for prior chemotherapy and/or immunotherapy but subsequent receipt of more immunotherapy and/or platinum-based chemotherapy is also allowed. * note: prior anti-vegf antibody therapy (ie bevacizumab) is allowed. prior ipilimumab, or investigational agents not excluded below, in combination with the required prior therapies above are allowed. * note: prior receipt of one or two lines of targeted therapy for ros1, ret, met, braf, erbb2/her2, or kras g12c positive nsclc is allowed and will not count toward the line of therapy limit. however, progression is still required after chemotherapy and immunotherapy as above. patients with ros1, ret, met positive nsclc are strongly encouraged to get appropriate targeted therapy (such as crizotinib, entrectinib, lorlatinib, selpercatinib, pralsetinib, capmatinib, tepotinib, or another investigational, off-label, or approved agent directed against ros1, ret, or met positive nsclc) prior to participation and will be stratified. * note: no prior predominantly vegfr directed tki therapy (such as cabozantinib, lenvatinib, or sitravantinib) is allowed, except for the agents named above. * randomization (step 1): the investigator must document the intended chemotherapy regimen should their patient be randomized to arm c (docetaxel and ramucirumab, or single agent chemotherapy - docetaxel, gemcitabine, paclitaxel, nab-paclitaxel). the patient must not have received the selected chemotherapy agent previously for metastatic disease * randomization (step 1): any prior chemotherapy (based on administration schedule) must have been completed in greater than or equal to the following times prior to randomization: * fda approved targeted oral therapy must be completed \>= 1 week prior * chemotherapy and/or immunotherapy must be completed \>= 2 weeks prior * prior investigational agents must be completed \>= 4 weeks prior. * randomization (step 1): prior radiation therapy is allowed with a 2 week washout prior to randomization. patient must not receive any systemic treatment with radionuclides within 6 weeks prior to randomization. patient must have no clinically relevant ongoing complication from prior radiation therapy * randomization (step 1): patients with a prior or concurrent malignancy whose natural history or treatment does not have the potential to interfere with the safety or efficacy assessment of the investigational regimen (in the opinion of the treating physician) are eligible for this trial * randomization (step 1): patients with known history or current symptoms of cardiac disease, or history of treatment with cardiotoxic agents (such as anthracycline or her2-directed antibody therapy, but not prior checkpoint inhibitor therapy), must have a clinical risk assessment of cardiac function using the new york heart association functional classification. to be eligible for this trial, patients must be class 2b or better * randomization (step 1): patient must have eastern cooperative oncology group (ecog) performance status 0-1 * randomization (step 1 - all treatment arms): patient must have met the eligibility criteria outlined above * randomization (step 1 - all treatment arms): patient must have measurable disease as defined by recist v1.1. measurements must be obtained within 4 weeks prior to randomization/registration * randomization (step 1 - all treatment arms): patient must have recovered to equal to or less than grade 1 toxicities related to prior treatment, unless toxicities are clinically non significant and/or stable on supportive therapy (as determined by the treating physician) * randomization (step 1 - all treatment arms): absolute neutrophil count \>= 1,500/mcl (obtained within 2 weeks prior to randomization) * randomization (step 1 - all treatment arms): platelets \>= 100,000/mcl (obtained within 2 weeks prior to randomization) * randomization (step 1 - all treatment arms): hemoglobin \>= 9 g/dl (obtained within 2 weeks prior to randomization) * randomization (step 1 - all treatment arms): total bilirubin =\< 1.5 x institutional upper limit of normal (uln) (for patients with gilbert's disease total bilirubin must be =\< 3 x uln) (obtained within 2 weeks prior to randomization) * randomization (step 1 - all treatment arms): aspartate aminotransferase (ast)(serum glutamic oxaloacetic transaminase \[sgot\]) and alanine aminotransferase (alt)(serum glutamate pyruvate transaminase \[sgpt\]) =\< 2.5 x uln (obtained within 2 weeks prior to randomization) * randomization (step 1 - all treatment arms): creatinine =\ = 50 ml/min/1.73m\^2 (normalized to body surface area \[bsa\]) for patients with creatinine levels greater than 1.5 times the institutional normal creatinine =\ = 50ml/min/1.73m\^2 (obtained within 2 weeks prior to randomization) * randomization (step 1 - all treatment arms): patients must not be pregnant or breast-feeding due to the unknown effects of cabozantinib and nivolumab on human development and for the potential risk for adverse events in nursing infants with the treatment regimens being used. * all patients of childbearing potential must have a blood test or urine study within 14 days prior to randomization/registration to rule out pregnancy. * a patient of childbearing potential is anyone, regardless of sexual orientation or whether they have undergone tubal ligation, who meets the following criteria: 1) has achieved menarche at some point, 2) has not undergone a hysterectomy or bilateral oophorectomy; or 3) has not been naturally postmenopausal (amenorrhea following cancer therapy does not rule out childbearing potential) for at least 24 consecutive months (i.e., has had menses at any time in the preceding 24 consecutive months). * randomization (step 1 - all treatment arms): patients must not expect to conceive or father children by using accepted and effective method(s) of contraception or by abstaining from sexual intercourse for the duration of their participation in the study and for 6 months after completion of treatment on the study * randomization (step 1 - all treatment arms): patients must not have clinically significant gastrointestinal bleeding within 6 months prior to randomization * randomization (step 1 - all treatment arms): patients must not have pulmonary hemorrhage or hemoptysis of \>= 0.5 teaspoon (2.5 ml) of red blood within 3 months prior to randomization * randomization (step 1 - all treatment arms): patients must not have active drug induced pneumonitis within 3 months prior to randomization. prior immune mediated pneumonitis of grade 3 or 4 are not eligible regardless of time window * randomization (step 1 - all treatment arms): patients must not have current radiographic evidence of tumor invading major blood vessel, evidence of tumor cavitation \> 1 cm, evidence of tumor invading the gastrointestinal (gi) tract (esophagus, stomach, small or large bowel, rectum or anus), or evidence of endotracheal or mainstem endobronchial tumor * randomization (step 1 - all treatment arms): patients must not have peptic ulcer disease, known malabsorption syndrome, bowel obstruction or gastric outlet obstruction within 3 months prior to randomization * randomization (step 1 - all treatment arms): patients must not have abdominal fistula, gi perforation, or intra-abdominal abscess within 6 months prior to randomization * randomization (step 1 - all treatment arms): patients must not have grade 3 or greater infection, or infection requiring intravenous systemic treatment within 14 days prior to randomization. patients must be off antibiotics at the time of randomization * randomization (step 1 - all treatment arms): patients must not have serious non-healing wound/ulcer/bone fracture within 28 days prior to randomization * randomization (step 1 - all treatment arms): patients must not have history of organ transplant * randomization (step 1 - all treatment arms): patients must not have concurrent symptomatic untreated hypothyroidism * randomization (step 1 - all treatment arms): patients must not have history of major surgery within 3 months prior to randomization, minor surgery within 28 days prior to randomization, other minor procedures within 7 days prior to randomization, or clinically relevant ongoing complications from prior procedures * randomization (step 1 - all treatment arms): patients must not have concurrent uncontrolled hypertension defined as sustained blood pressure (bp) \> 160 mm hg systolic, or \> 100 mm hg diastolic despite optimal antihypertensive treatment * randomization (step 1 - all treatment arms): patients must not have unstable angina pectoris, clinically-significant cardiac arrhythmias, stroke (including transient ischemic attack \[tia\]), or myocardial infarction within 6 months prior to randomization * randomization (step 1 - all treatment arms): patients must not have a diagnosis of deep vein thrombosis/pulmonary embolism (dvt/pe) within 6 months of randomization unless stable, asymptomatic, and treated with low-molecular-weight heparin (lmwh) or a permitted oral anticoagulant for at least 7 days before randomization * randomization (step 1 - all treatment arms): patient must not be receiving anticoagulants (i.e., warfarin, aspirin, clopidogrel) except: * prophylactic use of low-dose aspirin (100 mg po daily or less) and/or low dose molecular weight heparin (lmwh) is permitted. * therapeutic doses of low dose molecular weight heparin (lmwh) or specified direct factor xa inhibitors rivaroxaban, edoxaban, or apixaban are allowed in patients without untreated brain metastases who are on a stable dose 7 days prior to study randomization, and without clinically significant hemorrhagic complications from the anticoagulation regimen or the tumor * randomization (step 1 - all treatment arms): patient must not receive strong cyp3a4 inducers (e.g., dexamethasone (\> 1 mg daily dosing), phenytoin, carbamazepine, rifampin, rifabutin, rifapentine, phenobarbital, and st. john's wort) within 7 days prior to randomization * randomization (step 1 - all treatment arms): patient must have corrected qt interval calculated by the fridericia formula (qtcf) =\< 500 msec within 28 days prior to step 1 randomization * randomization (step 1 - all treatment arms): patient must be able to swallow tablets * randomization (step 1 - all treatment arms): patient must not be on continuous systemic treatment with corticosteroids (\> 10 mg daily prednisone equivalents) or other immunosuppressive medications within 7 days prior to randomization, with the following exceptions: * inhaled or topical steroids and adrenal replacement doses =\< 10 mg daily prednisone equivalents are permitted in the absence of active autoimmune disease. * patients are permitted to use topical, ocular, intra-articular, intranasal, and inhalational corticosteroids (with minimal systemic absorption). * physiologic replacement doses of systemic corticosteroids are permitted, if \< 10 mg/day prednisone equivalents. a brief course of corticosteroids for prophylaxis (e.g., contrast dye allergy) or for treatment of non-autoimmune conditions (e.g., delayed-type hypersensitivity reaction caused by contact allergen) is permitted * randomization (step 1 - all treatment arms): patients with brain metastases are eligible as follows: * previously treated brain metastases must have been treated with radiation \> 2 weeks prior to randomization or surgery \> 3 months prior to randomization or * untreated (active) brain metastases are allowed if they are clinically asymptomatic, \< 1 cm, non-hemorrhagic, the patient is not on systemic anticoagulation, and the investigator believes that central nervous system (cns) specific treatment is unlikely to be required during the first 3 months of study treatment. * note: symptomatic leptomeningeal disease is not allowed * randomization (step 1 - all treatment arms): patient must not have known active autoimmune disease or known history of autoimmune disease for which recurrence may affect vital organ function or require immune suppressive treatment including systemic corticosteroids (e.g., immune-related neurologic disease, multiple sclerosis, autoimmune neuropathy, guillain-barre syndrome, etc.). * randomization (step 1 - all treatment arms): patients with known history of human immunodeficiency virus (hiv)-infection must be on effective anti-retroviral therapy with undetectable viral load within 6 months of randomization * randomization (step 1 - all treatment arms): patients with known history of chronic hepatitis b virus (hbv) infection must have undetectable hbv viral at time of randomization (suppressive therapy is allowed, if indicated) * randomization (step 1 - all treatment arms): patients with a known history of hepatitis c virus (hcv) infection must have been treated and cured. for patients with hcv infection who are currently on treatment, they are eligible if they have an undetectable hcv viral load at time of randomization * randomization (step 1 - all treatment arms): patient must not have had any prior allergic reaction or hypersensitivity to study drug components or related drugs (multitargeted small molecule tyrosine kinase inhibitors or checkpoint inhibitor monoclonal antibodies) * step 2 (crossover arm z): patient must have met all eligibility requirements for step 1 at time of registration to step 1 to be eligible for step 2 * step 2 (crossover arm z): patient must have radiographic progressive disease per recist criteria after \>= 2 cycles of therapy on arm c. the scan showing progression must be completed within 6 weeks prior to step 2 registration * step 2 (crossover arm z): patient must not have intervening anticancer treatment or major surgical procedure(s) between step 1 and step 2, except palliative radiation which was completed \>= 1 week prior to registration to step 2 * step 2 (crossover arm z): patient may not have central nervous system progression, but patients with stable cns disease are allowed * step 2 (crossover arm z): patient must have an ecog performance status 0-2 * step 2 (crossover arm z): patient must have recovered to equal to or less than grade 1 toxicities related to prior treatment, unless the adverse event(s) are clinically non significant and/or stable on supportive therapy (as determined by the treating physician) * step 2 (crossover arm z): absolute neutrophil count \>= 1,500/mcl (obtained within 2 weeks prior to registration to step 2) * step 2 (crossover arm z): platelets \>= 100,000/mcl (obtained within 2 weeks prior to registration to step 2) * step 2 (crossover arm z): hemoglobin \>= 9 g/dl (obtained within 2 weeks prior to registration to step 2) * step 2 (crossover arm z): total bilirubin =\< 1.5 x institutional uln (for patients with gilbert's disease total bilirubin must be =\< 3 x uln) (obtained within 2 weeks prior to registration to step 2) * step 2 (crossover arm z): ast(sgot) and alt(sgpt) =\< 2.5 x uln (obtained within 2 weeks prior to registration to step 2) * step 2 (crossover arm z): creatinine =\ = 50 ml/min/1.73m\^2 (normalized to bsa) for patients with creatinine levels greater than 1.5 times the institutional normal creatinine =\ = 50ml/min/1.73m\^2 (obtained within 2 weeks prior to registration to step 2) * step 2 (crossover arm z): patient must have corrected qt interval calculated by the fridericia formula (qtcf) =\< 500 ms within 28 days prior to step 2 registration * step 2 (crossover arm z): patient must not have any intercurrent illness or disease complication that the investigator believes would limit the ability to safely tolerate the combination of cabozantinib and nivolumab * step 2 (crossover arm z): patient must not be pregnant or breast-feeding due to the unknown effects of cabozantinib and nivolumab on human development and for the potential risk for adverse events in nursing infants with the treatment regimens being used. * all patients of childbearing potential must have a blood test or urine study within 14 days prior to registration to step 2 to rule out pregnancy. * a patient of childbearing potential is anyone, regardless of sexual orientation or whether they have undergone tubal ligation, who meets the following criteria: 1) has achieved menarche at some point, 2) has not undergone a hysterectomy or bilateral oophorectomy; or 3) has not been naturally postmenopausal (amenorrhea following cancer therapy does not rule out childbearing potential) for at least 24 consecutive months (i.e., has had menses at any time in the preceding 24 consecutive months). * step 2 (crossover arm z): patients must not expect to conceive or father children by using accepted and effective method(s) of contraception or by abstaining from sexual intercourse for the duration of their participation in the study and for 6 months after completion of treatment on the study