The two-dimensional (2D) perovskites stabilized by alternating cations in the interlayer space (ACI) define a new type of structure with different physical properties than the more common Ruddlesden-Popper counterparts. However, there is a lack of understanding of material crystallization in films and its influence on the morphological/optoelectronic properties and the final photovoltaic devices. Herein, we undertake in situ studies of the solidification process for ACI 2D perovskite (GA)(MA) nPb nI3 n+1 (⟨ n⟩ = 3) from ink to solid-state semiconductor, using solvent mixture of DMSO:DMF (1:10 v/v) as the solvent and link this behavior to solar cell devices. The in situ grazing-incidence X-ray scattering (GIWAXS) analysis reveals a complex journey through disordered sol-gel precursors, intermediate phases, and ultimately to ACI perovskites. The intermediate phases, including a crystalline solvate compound and the 2D GA2PbI4 perovskite, provide a scaffold for the growth of the ACI perovskites during thermal annealing. We identify 2D GA2PbI4 to be the key intermediate phase, which is strongly influenced by the deposition technique and determines the formation of the 1D GAPbI3 byproducts and the distribution of various n phases of ACI perovskites in the final films. We also confirm the presence of internal charge transfer between different n phases through transient absorption spectroscopy. The high quality ACI perovskite films deposited from solvent mixture of DMSO:DMF (1:10 v/v) deliver a record power conversion efficiency of 14.7% in planar solar cells and significantly enhanced long-term stability of devices in contrast to the 3D MAPbI3 counterpart.