Automated vehicles (AVs) face a critical need to evaluate and predict the risk of various driving maneuvers, especially in complex driving scenarios such as overtaking human-driven vehicles (HDVs). However, overtaking safety performance evaluation and prediction rarely take into account dynamic trust and AV driving styles. Moreover, the adequacy of the time window length for data collection prior to overtaking, critical for risk prediction, remains insufficiently explored. This study aims to evaluate overtaking safety performance on two-lane highways considering drivers’ dynamic trust and different AV driving styles, and predict overtaking risk focusing on the impact of different time window lengths. 47 participants were tasked with a simulated overtaking experiment involving both impeding and opposite automated vehicles (IAV and OAV) that exhibited either defensive or aggressive driving styles. Dynamic trust and subjective risk were assessed through a questionnaire after each overtaking maneuver, and objective risk was evaluated using time-to-collision-threshold Driving Risk Field method. Results show that the driving styles of IAV and OAV significantly impacted dynamic trust, objective risk and subjective risk. As dynamic trust in AVs increases, subjective risk decreases but an apparent rise in objective risk is noted, highlighting the importance of controlling over-trust. Results also illustrate that an aggressive IAV leads to a reduction of both following distance to the IAV and lateral distance to the roadside. Additionally, the time window length significantly influenced the prediction performance and a 1.5-second window was found to be optimal using the Light Gradient Boosting Machine model, achieving an accuracy of 92.3% and an F1-score of 0.905. By incorporating this insight, AVs can better anticipate and respond to the intentions of human drivers, leading to safer interactions on the road.