Prior treatment with a MEK inhibitor or ERK inhibitor Prior systemic therapy with a MEK inhibitor Prior treatment with any RAF inhibitor, MEK inhibitor, cetuximab, panitumumab or other EGFR inhibitors Prior treatment with a MEK, Ras or Raf inhibitor Prior navitoclax, BRAF inhibitor, and MEK inhibitor is prohibited; (exceptions for Phase I are described above) Prior treatment with cobimetinib or a MEK inhibitor Previous treatment with cobimetinib or any other mitogen-activated protein/extracellular signal-regulated kinase (MEK) inhibitor Prior treatment with selumetinib or another specific MEK 1/2 inhibitor If BRAFV600-mutant, refractory disease to at least one BRAF inhibitor and a MEK inhibitor (defined as progression while on treatment), or intolerance to these drugs STRATUM B: Previous exposure to a MEK inhibitor (i.e., trametinib, selumetinib) Prior therapy with a MEK inhibitor Previous mitogen-activated protein kinase kinase (MEK) inhibitor use such as PD-0325901; CI1040; AS73026; GDC 0973; ARRY43182; GSK110212 Prior treatment with MEK inhibitor Prior MEK inhibitor therapy is allowed Prior treatment with a MAP-kinase pathway inhibitor (RAS, RAF, ERK, MEK) Prior therapy with selumetinib or another specific mitogen-activated protein kinase kinase (MEK) inhibitor is not permitted Previous MEK, retrovirus associated sequence (RAS), or RAF inhibitor use Prior treatment with a BRAF inhibitor or a MEK inhibitor; treatment by localized radiotherapy is not an exclusion criterion if an interval of at least two weeks between the end of radiotherapy and initiation of protocol therapy is observed Prior treatment with selumetinib or another specific MEK 1/2 inhibitor Prior treatment with a mitogen-activated protein kinase kinase (MEK) inhibitor Previous treatment with any MEK inhibitor Any prior treatment with either a MEK, Ras, or Raf inhibitor for advanced or metastatic NSCLC. Prior therapy with a MEK inhibitor Part B: Prior treatment with a RAF or MEK pathway inhibitor, except BRAFmutant melanoma (Group 1) Prior treatment with 1 BRAF inhibitor and/or 1 MEK inhibitor allowed No history of prior exposure to a MEK inhibitor Past treatment with any MEK or ERK inhibitor or with panitumumab Prior MEK inhibitor or prior TAS-102 therapy Previous MEK, RAS, or RAF inhibitor use If BRAFV600-mutant, documented refractory disease to at least one BRAF inhibitor (dabrafenib or vemurafenib) and/or a MEK inhibitor (trametinib or cobimetinib), defined as progression of measurable disease as per Response Evaluation Criteria in Solid Tumors (RECIST) criteria while on treatment; subjects with MAPK inhibitor-intolerance are eligible if they meet criteria Patients who have prior therapy with trametinib or any other MEK inhibitor Subjects with B-Raf V600 (BRAFV600) mutated tumors who have received prior BRAF inhibitor therapy either alone or in combination with MEK inhibitor as their only prior systemic therapy are eligible. Patients must not have been treated with any of the following prior to Step 1 Randomization:\r\n* Cetuximab, panitumumab, or any other monoclonal antibody against EGFR or inhibitor of EGFR\r\n* BRAF inhibitor including, but not limited to, vemurafenib or dabrafenib; regorafenib is not considered a BRAF inhibitor for the purpose of determining trial eligibility\r\n* Mitogen-activated protein/extracellular signal–regulated kinase (MEK) inhibitor including, but not limited to, trametinib or selumetinib Prior cytotoxic therapy and immunotherapy are allowed; for the dose escalation, prior targeted therapy with a MEK inhibitor, protein kinase C inhibitor, Akt, or mTOR inhibitor are allowed; for the dose expansion cohort, no prior MEK, protein kinase C (PKC), Akt, or mTOR inhibitors are allowed, and registration is limited to 10 total patients; local therapies such as radiofrequency ablation or cryotherapy for metastatic disease are permitted but must have been performed at least 21 days prior to initiation of study therapy; lesions treated with local or regional modalities such as radiofrequency ablation, or cryotherapy may not be used as target lesions unless they demonstrate growth over a minimum of 3 months on subsequent imaging studies Prior treatment with a mitogen-activated protein kinase kinase (MEK) inhibitor of any kind History of prior significant toxicity from another mitogen-activated protein kinase (MEK) pathway inhibitor requiring discontinuation of treatment Prior treatment with a Mitogen-Activated protein Kinase (MEK) inhibitor or any docetaxel-containing regimen (prior treatment with paclitaxel is acceptable). Prior therapy with a BRAF inhibitor and/or a MEK- inhibitor Group 5: Patients with MEK mutated cancer Prior therapy with a MEK- inhibitor Prior treatment with a MEK (Mitogen-Activated Protein Kinase) inhibitor or any docetaxel-containing regimen (prior treatment with paclitaxel is acceptable) Prior treatment with a selective inhibitor of RAF or MEK Prior treatment with a BRAF inhibitor (including but not limited to dabrafenib [GSK2118436], vemurafenib, and LX281/BMS-908662) or a MEK inhibitor (including but not limited to trametinib [GSK1120212], AZD6244, and RDEA119); NOTE: there is no limit to the number of other prior therapies, and patients may be previously untreated Patients previously treated with potent BRAF inhibitor or MEK inhibitor, including PLX4032/vemurafenib, ARQ 736 for more than 10 days; previous treatment with sorafenib is permitted Previous treatment with a BRAF inhibitor (including but not limited to dabrafenib, vemurafenib, LGX818, and XL281/BMS-908662) or MEK inhibitor (including but not limited to trametinib, AZD6244, and RDEA119) prior to start of study treatment (Note: Prior treatment with dabrafenib is allowed for crossover subjects in Cohort A); Prior MEK inhibitor therapy is allowed Patients who have received prior treatment with a MEK inhibitor Prior therapy with a mitogen-activated protein kinase kinase (MEK)-inhibitor Prior therapy with a MEK inhibitor Patients who have had prior VEGF pathway inhibitor, BRAF or MEK inhibitor therapy are ineligible. History of prior significant toxicity from another MEK inhibitor or ERK inhibitor requiring discontinuation of treatment Prior therapy with a MEK- inhibitor Prior treatment with a BRAF inhibitor or MEK inhibitor History of prior significant toxicity from another MEK pathway inhibitor or combination of another MEK and epidermal growth factor receptor (EGFR) inhibitor requiring discontinuation of treatment Previous treatment with a combination of a MEK inhibitor with an EGFR inhibitor (applies only to the indication specific expansion cohorts in Stage 2) The subject has been previously treated with a Mitogen-activated protein/extracellular signal-regulated kinase (MEK) inhibitor. Prior treatment with a BRAF inhibitor (including but not limited to dabrafenib, vemurafenib, and XL281/BMS-908662) or a MEK inhibitor (including but not limited to trametinib, AZD6244, and RDEA119) or ipilimumab or any other agent targeting a T-cell immunomodulatory pathway (including, but not limited to CTLA-4, PD-1, 4-1BB, OX40, GITR, CD27, and CD28) Prior therapy with a MEK inhibitor. Part 2 ONLY: Previous treatment with dabrafenib, another RAF inhibitor, or a mitogen-activated protein kinase (MEK) inhibitor (exception: prior treatment with sorafenib is permitted). Prior treatment with selumetinib or another specific mitogen-activated protein kinase (MEK)1/2 inhibitor (unless the subject meets criteria for re-treatment) Subjects who have not yet initiated but plan to undergo dosing with a tyrosine kinase inhibitor (TKI) or Raf inhibitor, either alone or with a MEK inhibitor, for treatment of metastatic melanoma, colon cancer, hepatic cell carcinoma, or thyroid cancer History of prior significant toxicity from another MEK or ERK inhibitor requiring discontinuation of treatment Previous treatment with dabrafenib, trametinib, other RAF inhibitor, other MEK or ERK inhibitor