Predicting financial trouble effectively is now crucial as businesses face an increasing variety of financial threats. This research utilizes a dataset to predict a company's financial difficulties using GBDT and Random Forest models. The objective is to assess how well these models handle nonlinear interactions, capture data properties, and prevent overfitting. Firstly, data preprocessing ensures data quality, and then random forest and GBDT models are applied for analysis. Random forests perform outstandingly in feature selection and avoiding overfitting, while GBDT has significant advantages in capturing nonlinear relationships. The evaluation results show that the single model has limitations. Therefore, this article proposes to integrate the random forest and GBDT model to comprehensively leverage their respective advantages. The experimental results of the integrated model show a significant improvement in predictive performance. In summary, the model integration strategy effectively improves the accuracy of financial distress prediction, provides a more reliable tool for enterprise risk management, and also offers new directions for future research.