There are many demands for the cooperative localization (CL) of multiple people, such as firefighter rescue. The classical foot-mounted inertial navigation based on zero velocity update (ZUPT) suffers from accumulating error due to the low-cost inertial sensor, and the pre-placed anchors in the ultra-wideband (UWB) system limit the application in an unknown environment. In this study, a group of sensors including the inertial measurement unit (IMU), magnetometer, barometer, and UWB sensor is used. Through the different characteristics of sensors and the position relationship between people, a cooperative localization system using an extended Kalman filter for three-dimensional firefighter tracking is proposed. Ranging information between firefighters from UWB is utilized, and couplings introduced by relative measurement are estimated. Two experiments are designed to verify the proposed algorithm in building and forest environments. Compared with the results of single-person inertial navigation, the average positioning precision of the algorithm in the building and forest is, respectively, improved by 38.93% and 79.01%. This approach successfully suppresses the divergence of positioning errors, and fixed UWB anchors are not needed.