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.