Understanding the mean-flow structures of a separated turbulent boundary layer (TBL) is crucial for turbulence modeling. This study investigates the spatial scaling properties of the total shear stress and mixing length in the TBLs bounding a two-dimensional (2D) separation bubble, aiming to derive analytical descriptions for the entire mean-velocity profiles of the TBLs. For the adverse pressure gradient (APG) TBL upstream of the separation bubble, the total shear stress possesses a two-layer structure with an inner layer adhering to a linear law and an outer layer conforming to a defect power law. In contrast, the mixing length profile consists of four layers, namely the viscous sublayer, the buffer layer, the overlap layer, and the wake region. Each of the layers exhibits a power law or a defect power law relationship with the spatial coordinate normal to the wall. In the four-layer structure, three parameters are sensitive to the variation of the APG: the buffer-layer thickness, the relative magnitude of the mixing length at the boundary layer edge, and a defect power law exponent quantifying the extent of the wake region. For the reattached TBL downstream of the separation bubble, the total shear stress consists of two parts. One part is induced by the pressure gradient and retains the two-layer structure, while the other, engendered by the intense turbulence advected from the separated shear layer, exhibits a dual-power-law distribution. The advected turbulence also significantly alters the four-layer structure of the mixing length, resulting in an augmented buffer layer, a diminished overlap layer, and a wake region that mimics a turbulent mixing layer. Via a dilation ansatz to describe the scaling transition between adjacent layers, the study formulates the complete profiles of the total shear stress and mixing length. The formulation leads to the derivation of novel analytical expressions for the entire mean-velocity profiles of the TBLs. The expressions are in precise accord with the direct numerical simulations of an incompressible 2D separation-bubble flow and a 2D impinging shock wave/TBL interaction. The elucidation of the mean-flow structures through this study is anticipated to facilitate the analysis of turbulence models, thereby enhancing their performance in simulating separated TBLs. The construction of the mean-flow descriptions by inspecting the spatial scaling properties of turbulence paves a promising way for theoretical exploration of complex nonequilibrium TBLs.