In this paper, a transmission-distribution systems flexibility market is introduced, in which system operators (SOs) jointly procure flexibility from different systems to meet their needs (balancing and congestion management) using a common market. This common market is, then, formulated as a cooperative game aiming at identifying a stable and efficient split of costs of the jointly procured flexibility among the participating SOs to incentivize their cooperation. The non-emptiness of the core of this game is then mathematically proven, implying the stability of the game and the naturally-arising incentive for cooperation among the SOs. Several cost allocation mechanisms are then introduced, while characterizing their mathematical properties. A case study is then presented, considering an interconnected system composed of the IEEE 14-bus transmission system and the Matpower 18-bus, 69-bus, and 141-bus distributions systems. The numerical results showcase the cooperation-induced reduction in system-wide flexibility procurement costs, and identify the varying costs borne by the different SOs under different cost allocations methods.