Trajectory prediction and planning remain key challenges for autonomous vehicles, particularly in complex and dynamic environments. Existing methods, typically based on static safety metrics like time-to-collision, fail to account for the evolving nature of risk in real-world traffic. This article proposes a novel safety-aware trajectory prediction and planning (SA-TP$^{2}$) model, which introduces an adaptive driver risk field to simulate human-like risk perception and decision-making. By dynamically modeling risk as a continuous variable, SA-TP$^{2}$ adjusts vehicle trajectories in real time, accounting for interactions with other agents, road conditions, and environmental uncertainties. The model integrates imitation learning, rule-based strategies, and physics-informed neural networks to ensure safe, efficient, and human-compatible behavior. A Linformer-based architecture and temporal hypergraph convolution network are introduced to optimize computational efficiency, enabling real-time operation in resource-constrained environments. Experimental results on benchmark datasets including next generation simulation (NGSIM), highway drone dataset (HighD), Macao connected autonomous driving (MoCAD), and NuScenes demonstrate that SA-TP$^{2}$ achieves the state-of-the-art performance in trajectory prediction. In addition, extensive closed-loop testing on the NuPlan and CommonRoad platforms further confirms that SA-TP$^{2}$ outperforms existing baselines, paving the way for safer navigation of autonomous driving systems.