Mutation results:\r\n* All patients must have molecular testing performed in a Clinical Laboratory Improvement Act (CLIA) certified lab which includes which includes KRAS and NRAS gene and exon of BRAF gene (BRAF VE mutation); patients with any known activating mutation in exon (codons and ), exon (codons and ) and exon (codons and ) of KRAS/NRAS genes and in exon (BRAFVE mutation) of BRAF gene are not eligible An EGFR exon insertion mutation must be detected in the tumor tissue; patients may be enrolled in the study based on an exon insertion EGFR mutation detected by any Clinical Laboratory Improvement Act (CLIA)-certified tissue assay\r\n* NOTE: Testing results are to be submitted via Medidata Rave and the study chair or delegate will review the reports Participants with known epidermal growth factor receptor (EGFR) mutations which are sensitive to available targeted inhibitor therapy (including, but not limited to, deletions in exon and exon [LR] substitution mutations) are excluded For Part only: Participants must also have disease with a previously diagnosed activating epidermal growth factor receptor (EGFR) mutation (includes both inhibitor sensitive primary mutations such as Exon deletion and LR, as well as marketed tyrosine kinase inhibitor [TKI] -resistant mutations such as Exon insertion). Documentation of EGFR mutation eligibility by CLIA-certified laboratory (or equivalent) testing is required Eligible for first-line treatment with erlotinib based on documented evidence of tumor harboring an activating EGFR mutation [exon deletion or exon (LR) substitution mutation]. Non-small cell lung cancer (NSCLC) or pancreatic cancer identified by exon deletions or exon LR substitution mutations Cancers with exon mutations Presence of sensitizing EGFR mutations (deletion in exon , LR in exon , GX, and LQ); patients with the TM mutation will also be eligible EGFR mutations as performed on a Clinical Laboratory Improvement Amendments (CLIA) certified laboratory demonstrating EGFR exon GX, exon SI, or exon LQ. Patients with compound (also referred to as multiple mutations) will be eligible provided the non-small cell lung cancer [NSCLC] demonstrates one of these mutations) Detection of concurrent EGFR mutation with exon TM, exon deletion, exon LR mutation or exon insertion. Patients with compound (also referred to as multiple mutations) will be excluded if the molecular testing includes one of these mutations Documented activating EGFR mutation (Exon deletion, TM, or LR) on tumor samples by Food and Drug Administration (FDA)-approved test Prior genotyping positive for an EGFR activating mutation (LR, exon deletion, GX, LQ) An EGFR sensitizing mutation must be detected in tumor tissue; specifically, patients harboring the most common mutations, deletions in exon or the LR mutation in exon are eligible; other EGFR sensitizing mutations may be eligible after discussion with the principal investigator; patients may be enrolled in the study based on an activating EGFR mutation detected by a Clinical Laboratory Improvement Act (CLIA) certified tissue or plasma-based assay, but will be required to undergo a mandatory tumor biopsy during study screening Patients must have tumors that lack sensitizing EGFR mutation (e.g. exon deletion or exon LR) or ALK rearrangement; if a patient has squamous histology, then EGFR and ALK testing is not required Historical confirmation that the tumor harbors an EGFR mutation known to be associated with EGFR TKI sensitivity (including GX, exon deletion, LR, LQ). Patients whose tumors known to harbor an exon deletion or exon LR EGFR mutation must have progressed on or had intolerance to an EGFR TKI; patients whose tumors are known to harbor an ALK translocation must have progressed on or had intolerance to an ALK inhibitor Cohort specific inclusion criteria: Documented EGFR exon mutation by one of the following Clinical Laboratory Improvement Act (CLIA) certified tests: OncoMine Comprehensive Assay (OCA), Guardant Assay (using plasma), or FoundationOne Assay or by a Food and Drug Administration (FDA) approved device using cobas EGFR mutation test version (v) or therascreen EGFR RGQ PCt kit; eligible mutations include D_NinsSVD, D_NinsNPG, V_DinsASV, H_VinsNPH, or any other exon in-frame insertion or point mutation excluding TM Cohort specific inclusion criteria: documented HER exon mutation by a Clinical Laboratory Improvement Amendments (CLIA) certified laboratory; eligible mutations include A_GinsYVMA, G_VinsVC, or P_YinsGSP, or any other in-frame exon insertion mutation or point mutation including, but not limited to, LS, GV, and VL EGFR TM mutation or any other acquired EGFR exon mutation; patients with coexisting primary EGFR exon and TM mutations are eligible Documented EGFR exon insertion mutation Documented HER exon insertion mutation Patient has had previous treatment with poziotinib or any other EGFR or HER exon insertion mutation tyrosine kinase inhibitor prior to study participation Phase patients are also excluded if they had prior treatment with CK- or other third generation TKIs that target EGFR TM mutation-positive NSCLC, or have evidence that the tumor harbors an exon insertion mutation Tumor sample confirmed as KRAS or NRAS [codons and (exon ), and (exon ), and and (exon )] or BRAF [codon (exon )] mutation positive Patients with characterized EGFR mutations that predict sensitivity to EGFR therapy, including, but not limited to exon deletions and exon mutations Documented evidence of somatic activating mutation in EGFR (eg, GX, exon deletion, LR, LQ) in a tumor tissue sample. If a tissue sample is not available, then EGFR mutation status may be determined from circulating tumor DNA obtained from a blood sample using a validated or approved test kit. Presence of exon deletion or exon (LR) substitution of the EGFR gene EGFR mutation with exon deletion or LR mutation (Exon ) or ALK rearrangement positive must have failed prior TKI therapy Incurable, advanced or metastatic/recurrent non-small cell lung cancer with EGFR activating mutations (exon del, exon LR, LQ, GX); who have radiologic and/or clinically progressive disease on erlotinib at any point during the patient's cancer treatment as determined by the Investigator Non-small cell lung cancer (NSCLC) with an activating EGFR mutation (exon deletion, LR point mutation, or any other mutation known to be associated with EGFR TKI sensitivity); presence of an activating EGFR mutation may be documented in tumor tissue or by plasma testing if performed in a Clinical Laboratory Improvement Act (CLIA)-certified laboratory; AND Have a documented EGFR in-frame exon insertion by a local test, including A_YinsFQEA, V_DinsASV, D_NinsNPG, D_NinsSVD, H_VinsNPH, or any other in-frame exon insertion mutation. A HER exon insertion including A_GinsYVMA, G_VinsVC, or P_YinsGSP, or any other in-frame exon insertion mutation. An EGFR exon insertion: A_YinsFQEA, V_DinsASV, D_NinsNPG, D_NinsSVD, H_VinsNPH, or any other in-frame exon insertion mutation. A HER exon insertion: A_GinsYVMA, G_VinsVC, P_YinsGSP, or any other in-frame exon insertion mutation. For patients with an EGFR exon insertion: have not received a TKI with activity against the specific documented EGFR exon insertion. For patients with a HER exon insertion or HER activating point mutation: have not received a TKI with pan-HER activity (eg, afatinib, neratinib, or dacomitinib). Have one of the following documented by a local test: an activating mutation in EGFR including exon deletions or exon LR substitution (with or without TM), or an uncommon activating mutation other than exon insertion including, but not limited to, GX (where X is any other amino acid), SI, LQ, or LR. For patients with a documented EGFR exon deletion or exon LR substitution: resistant to at least one prior EGFR inhibitor (eg, erlotinib, gefitinib, or afatinib). Patients with an EGFR exon insertion Absence of an activating mutation (Exon deletion or Exon LR mutation) in the epidermal growth factor receptor (EGFR) in the pre-treatment biopsy of the tumor. Patients with activating EGFR mutations are eligible if they have progressed following treatment with erlotinib. A pretreatment tumor biopsy must be available for analysis. If a biopsy has not been performed prior to entry, then a biopsy will be required. All patients must have a somatic PIKCA gene mutation (i.e., RQ in exon , NK in exon , CR in exon , EK, EX [EA, ED, EG, and EK], QX [QE, QK, QL, and QR] in exon , and MI, HX [HL, HR, and HY], or GR in exon ) in a representative primary or metastatic tumor sample confirmed by the Roche COBAS PIKCA Mutation Test at Q^ Solutions Documented evidence of a tumor with or more EGFR mutations excluding exon \n insertion - Documented evidence of an exon insertion activating mutation in the EGFR gene Presence of JAK exon mutation Patients must have documented presence of an EGFR exon deletion or exon (LR) substitution mutation; TM mutation or other molecular abnormality will be allowed as long as it accompanies one of the mutations listed above; EGFR testing must be performed using a Food and Drug Administration (FDA)-approved test or in a Clinical Laboratory Improvement Amendments (CLIA)-certified laboratory. JAK exon mutation: PV that lacks the JAKVF mutation but is characterized by the exon mutation Pathologically confirmed diagnosis of non-small cell lung cancer with either EGFR exon deletion mutation, EGFR exon LR point mutation, exon GX, and exon LQ; other rare EGFR mutations may be eligible after discussion with the overall principal investigator; mutations detected at outside laboratories are acceptable for enrollment NSCLC must harbor at least one of the following EGFR activating mutations: Exon LR, Exon deletion, Exon GX, Exon LQ or for EGFR Exon insertion expansion cohort D, NSCLC must harbor an EGFR Exon insertion performed by a Clinical Laboratory Improvement Act (CLIA) certified test Dose escalation subjects: Epidermal Growth Factor Receptor (EGFR) activating mutation by local testing: exon GX, exon deletion, exon LQ, exon LR or exon insertion; and received prior treatment with EGFR Tyrosine Kinase Inhibitor (TKI) Subject on any line of treatment and has an EGFR exon insertion mutation on examination of an NSCLC tissue or cellular specimen. Local testing may determine eligibility and a tumor sample should also be sent for central testing. Known EGFR exon or mutation or ALK rearrangement Subjects with characterized Epidermal Growth Factor Receptor (EGFR) activating mutations that predict sensitivity to anti-EGFR-therapy, including, but not limited to exon deletions and exon alterations At least one documented EGFR mutation which is known to be related with susceptibility to EGFR-TKIs (including GX, exon deletion, LR, and LQ) Subject has squamous NSCLC, or an untreated known EGFR mutation of exon deletion or LR mutation in exon , or a known ALK gene rearrangement. Subject has non-squamous NSCLC, or a known Epidermal Growth Factor Receptor (EGFR) mutation of exon deletion or LR mutation in exon , or a known Anaplastic Lymphoma Kinase (ALK) gene rearrangement. All adenocarcinoma patients will be tested for ALK rearrangements and EGFR (exon deletion and exon LR substitution) mutations and must have been treated with prior EGFR or ALK therapy as well as a platinum containing doublet Participants must have histologically or cytologically confirmed stage IV or recurrent non-small cell lung cancer with a documented exon insertion mutation in EGFR (exon insertion/deletion and deletion mutations will also be allowed) Confirmation that the tumour harbours an EGFR mutation known to be associated with EGFR TKI sensitivity (including GX, exon deletion, LR, LQ) OR Histologic documentation of primary lung carcinoma, non-squamous histology with activating epidermal growth factor receptor (defined as deletion or exon LR mutation); Note: EGFR mutation testing must be performed at a Clinical Laboratory Improvement Amendments (CLIA) certified lab; either institutional or through a commercial laboratory (e.g. Genzyme, Response Genetics, etc); the laboratory report from the commercial laboratories report the specific mutations detected, and the method of detecting the exon and exon LR point mutations must be available Subject has an EGFR activating mutation (exon deletion or exon LR), with or without TM mutation, by local or central testing on examination of a NSCLC FFPE specimen (archival or fresh biopsy). Subjects harboring both exon deletion and exon LR mutations are not eligible. A tissue sample from the same block used to determine eligibility by local testing should be available to send to the central lab for confirmatory testing. Subjects randomized based on local results indicating presence of EGFR mutation may remain on study if central results are discordant. Documented evidence of a tumor with activating EGFR mutations by local testing. Patients with exon insertions are not eligible with the exception of patients with documented evidence of the exon insertion A_YinsFQEA in the EGFR gene Documented evidence of an exon insertion activating mutation other than A_YinsFQEA in the EGFR gene Subjects with known EGFR mutations which are sensitive to available targeted inhibitor therapy (including, but not limited to, deletions in exon and exon [LR] substitution mutations) are excluded; all subjects with non-squamous histology must have been tested for EGFR mutation status; use of a Food and Drug Administration (FDA)-approved test is strongly encouraged Subject has a documented exon deletion or exon LR EGFR activating mutation. Patients with tumors that harbor either EGFR sensitizing mutations or ALK rearrangement\r\n* EGFR sensitizing mutations include: \r\n** Exon deletion or insertion\r\n** LR (c. T>G)\r\n** GX (c. G>C, G>T, or G>A)\r\n** LQ (c. T>A) Metastatic NSCLC with documented EGFR exon deletion or exon (LR) substitution mutation If tumor histology is adenocarcinoma, must have wild-type EGFR genotype as assessed by a validated assay that includes exon deletion and exon (LR) substitution. PHASE I: Patients must have metastatic/recurrent, histologically confirmed NSCLC that harbors an EGFR activating mutation (exon LR, exon deletion, exon GX, exon LQ) with progressive disease by RECIST . on a previous EGFR-tyrosine kinase inhibitor (TKI); OR patients must have metastatic/recurrent histologically confirmed NSCLC that harbors an EGFR exon insertion with progressive disease on platinum containing chemotherapy PHASE II COHORT A: Patients must have metastatic/recurrent histologically confirmed NSCLC that harbors an EGFR activating mutation (exon LR, exon deletion, exon GX, exon LQ) with stable disease by RECIST . as best response on erlotinib compared to pre-treatment erlotinib imaging by RECIST . or progressive disease compared to pre-treatment imaging by RECIST . after a minimum duration of treatment on erlotinib of -weeks; patients must be enrolled within months of initiation of erlotinib PHASE II COHORT B: Patients must have metastatic/recurrent histologically confirmed NSCLC that harbors an EGFR exon insertion with progressive disease on or after platinum doublet chemotherapy For Part (phase , single agent): Patients with a known or presumed pathogenic KIT exon or resistance mutation. Documented evidence in tumor of exon insertion, small cell transformation, or MET amplification Patients with activating but not sensitizing mutations (exon insertions, EGFR TM) Activating EGFR mutation (exon deletion, LR, GX, LX) A documented somatic activating mutation in epidermal growth factor receptor (EGFR) (including but not limited to exon deletion or LR) For the MTD expansion cohort, patients will be eligible if they meet one of the following criteria:\r\n* Have an EGFR-sensitive mutation (as GC in exon , E-A in exon , LR in exon ) and have been previously treated with EGFR inhibitor therapy but have subsequently developed resistance, OR\r\n* Have an EGFR-resistant mutation (as TM in exon ), OR\r\n* Do not have an EGFR mutation, but have benefited from EGFR inhibitor therapy (including either >= months of stable disease [SD] OR a >= partial response [PR]) Histologically or cytologically confirmed metastatic stage IIIB/IV lung adenocarcinoma with known activating mutations in the EGFR TK domain (including exon deletion and LR) NSCLC must harbor an EGFR activating mutation (Exon LR, Exon deletion, Exon GX, Exon LQ) Histologically or cytologically documented metastatic or unresectable, locally advanced or metastatic NSCLC, with one or more activating EGFR mutation (eg, GX, exon deletion, LR, LQ) and absence of exon insertion Historical confirmation that the tumor harbors an epidermal growth factor receptor (EGFR) mutation known to be associated with EGFR tyrosine kinase inhibitor (TKI) sensitivity (including GX, exon deletion, LR, LQ)