Using SEER data, this work seeks to create a machine learning (ML) model to predict lung metastases (LM) and three-month prognostic variables in hepatocellular carcinoma (HCC) patients. The study comprised 34,861 HCC patients, 1,783 (5.11 %) of whom had lung metastases, and 859 were suitable for the 3-month prognostic model. The ML models were cross-validated twice, and with an AUC of 1 and an F1 score of 0.997, the random forest (RF) classifier was found to be the best choice for predicting LM. The Easy Ensemble (EE) classifier was utilized to address the dataset's class imbalance problem. The study also indicated that employing resampling approaches such as SMOTE can result in synthetic data, which can reduce model reliability, making EE the recommended choice for addressing the class imbalance. Overall, this study aims to improve clinical decision-making by providing a comprehensive predictive model for HCC patients with LM and a 3-month prognosis.