To promote the construction of a more equitable and harmonious new energy system, peer-to-peer (P2P) power sharing optimization research is carried out with intelligent public buildings as the research object. In this work, carbon capture systems (CCS)and power-to-gas (P2G) devices were added to the conventional building integrated energy system (BIES) model with improvements, while under the integrated demand response and carbon trading constraints, in order to reduce the interaction fluctuations between the BIES and the main grid and ensure the stability of the system operation. For the source-side uncertainty, the Frank-Copula theory joint probability distribution is used to generate typical daily output scenarios for wind and light. Based on Nash bargaining theory, a multi-BIES cooperative operation model is developed, and the alternating directional multiplier method (ADMM) is chosen to solve its two subproblems in a distributed manner, thus effectively protecting the privacy of each subject. The simulation results show that the BIES coalition benefits are maximized by the proposed power sharing method, and the coalition cooperation benefits are fairly distributed. This work can provide assurance and theoretical basis for the operational optimization of BIES and the interaction of multiple BIES in algorithm and transaction mode.