The evolution of distributed building energy systems fuels the growing demand for sustainable energy solutions. In this paper, Proton Exchange Membrane Fuel Cell (PEMFC) and Air Source Heat Pump (ASHP) were integrated to form PEMFC-ASHP-CHP systems in three combination methods, i.e., Direct Combination (DC), Parallel Combination (PC), Series Combination (SC). And compared the energy management strategies and power balance of the system. To further improve reliability and flexibility, a diversion PEMFC-ASHP-CHP system was proposed by combining PC and SC's system advantages. Additionally, an iterative algorithm addressed the mismatch between power supply and demand. An empirical formula was proposed to improve iterative convergence speed for practical control situations. The coefficients were optimized using six metaheuristic algorithms, and the outcomes were summarized into an optimized operational plane to enhance the system control response speed further. The results show that the PC method performs better than DC and SC. It achieves a power consumption reduction of 52.8% and a COP improvement of 111.4% compared with the ASHP system. Meanwhile, the diversion system can more effectively utilize waste heat from the PEMFC and further improve the system's performance. The Queuing Search Algorithm (QSA) demonstrates superior accuracy for coefficient optimization. By using the established empirical formula, the convergence speeds of global and local iterative methods are improved by 26.10% and 41.78%, respectively, compared to the direct iterative algorithm. Ultimately, the optimized operational plane can achieve a maximum 37.16% hydrogen consumption reduction compared to the unoptimized system.