We investigate a new method that enables the direct measurement of the density ratio of a K-Rb hybrid vapor cell, using the spin-exchange collision mixing of the K and Rb light shifts. The densities for each alkali metals can be further determined using Raoult's law. The mixture of the light shifts in both magnetometers and comagnetometers is formulated using Bloch equations and explained by considering the fast spin-exchange interaction. The relationship between the density ratio and the mixed light shifts is both formulated and simulated. The method was performed on several K-Rb magnetometer- and K-Rb-21Ne comagnetometer-cells at different temperatures, pump light powers, and mole fractions of K. The method was further verified by the conventional laser-absorption-spectroscopy method. The new approach has the advantage to measure the density ratio of the optically-thick hybrid alkali atoms, while requiring no additional magnetic field necessary for conventional magnetic-field induced Faraday-rotation techniques. It also has the advantage of in-situ measuring the density ratio under exactly the normal operation of the devices, which means that the errors caused by the heating-effect of the strong pump light and the temperature drift during long-term operation can be real-time monitored.