Cancer cell dysregulations result in the abnormal regulation of cellular metabolic pathways.By simulating this metabolic reprogramming using constraint-based modeling approaches, oncogenes can be predicted, and this knowledge can be used in prognosis and treatment. We introduced a trilevel optimization problem describing metabolic reprogramming for inferring oncogenes. First, this study used RNA-Seq expression data of lung adenocarcinoma (LUAD) and lung squamous cell carcinoma (LUSC) samples and their healthy counterparts to reconstruct tissue-specific genome-scale metabolic models and subsequently build the flux distribution pattern that provided a measure for the oncogene inference optimization problem for determining tumorigenesis. The platform detected 45 genes for LUAD and 84 genes for LUSC that lead to tumorigenesis. A high level of differentially expressed genes was not an essential factor for determining tumorigenesis. The platform indicated that pyruvate kinase (PKM), a well-known oncogene with a low level of differential gene expression in LUAD and LUSC, had the highest fitness among the predicted oncogenes based on computation. By contrast, pyruvate kinase L/R (PKLR), an isozyme of PKM, had a high level of differential gene expression in both cancers.