Dose Optimization, Part A, and Part B are randomized. Safety Lead-In for Part B is single arm, non-randomized.
Inclusion Criteria:
* Histologically or cytologically confirmed NSCLC with Stage IIIB-IIIC or Stage IV disease, not suitable for curative intent radical surgery or radiation therapy.
* Part B and Safety Lead-In Part B: the histology of the tumor must be predominantly non-squamous (in line with pemetrexed label).
* Must have disease with evidence of KRAS G12C mutation.
* Must have known programmed death-ligand 1 (PD-L1) expression
* Part A: Greater than or equal to (≥)50 percent (%).
* Part B: 0% to 100%.
* Must have measurable disease per RECIST v1.1.
* Must have an ECOG performance status of 0 or 1.
* Estimated life expectancy ≥12 weeks.
* Ability to swallow capsules.
* Must have adequate laboratory parameters.
* Contraceptive use should be consistent with local regulations for those participating in clinical studies.
* Women of childbearing potential must
* Have a negative pregnancy test.
* Not be breastfeeding during treatment
Exclusion Criteria:
* Have a documented additional validated targetable oncogenic driver mutation or alteration in genes such as epidermal growth factor receptor (EGFR), anaplastic lymphoma kinase (ALK), BRAF (V600E), human epidermal growth factor receptor 2 (HER2), MET (exon 14), ROS1, rearranged during transfection (RET), or neurotrophic tyrosine receptor kinase (NTRK)1/2/3.
* Have had any of the following prior to randomization:
-- Prior systemic therapy (chemotherapy, immunotherapy, targeted therapy, or biological therapy) for advanced or metastatic NSCLC.
--- 1 cycle of standard-of-care treatment prior to study enrollment will be allowed for cases where immediate treatment is clinically indicated:
* Have known active central nervous system metastases and/or carcinomatous meningitis.
Exclusion Criteria for Participants receiving Pemetrexed and Platinum (Part B and Safety Lead-In Part B)
* Have predominantly squamous cell histology for NSCLC
* Is unable to interrupt aspirin or other nonsteroidal anti-inflammatory drugs (NSAIDs)
* Is unable or unwilling to take folic acid or vitamin B12 supplementation.