Step 1: Ideal Gas Law.
The ideal gas law is given by:
\[
PV = nRT
\]
where \( P \) is the pressure, \( V \) is the volume, \( n \) is the number of moles, \( R \) is the gas constant, and \( T \) is the temperature. The number of moles \( n \) is related to the density \( \rho \) by:
\[
n = \frac{\rho V}{M}
\]
where \( M \) is the molar mass of the gas. Substituting this into the ideal gas law, we get:
\[
P = \frac{\rho RT}{M}
\]
Thus, the ratio of the densities of gases A and B is related to their molecular weights by:
\[
\frac{\rho_A}{\rho_B} = \frac{M_A}{M_B}
\]
Given that \( \rho_A = 1.5 \rho_B \), we find:
\[
\frac{M_A}{M_B} = 1.5
\]
Thus, the ratio of the molecular weights of A and B is \( \frac{3}{4} \).
Step 2: Final Answer.
Thus, the ratio of the molecular weights of A and B is \( \frac{3}{4} \).