This research study is examining merestinib (a targeted therapy) as a possible treatment for non-small cell lung cancer (NSCLC) that was found to have a specific change in the MET gene (a MET exon 14 mutation); or as a treatment for solid tumors that have an alteration in the NTRK gene (an NTRK1, 2, or 3 rearrangement).