The acceleration due to gravity at the surface of a planet is given by:
\[
g = \frac{GM}{R^2}.
\]
Using the relation \( M = \frac{4}{3} \pi R^3 \rho \), the acceleration \( g \) can be expressed as:
\[
g = \frac{G \cdot \frac{4}{3} \pi R^3 \rho}{R^2} = \frac{4}{3} \pi R \rho G.
\]
For planet A, the acceleration due to gravity is:
\[
g_A = \frac{4}{3} \pi R \rho G.
\]
For planet B, the radius is \( R_B = 1.5R \) and the density is \( \rho_B = \frac{\rho}{2} \). Therefore:
\[
g_B = \frac{4}{3} \pi R_B \rho_B G = \frac{4}{3} \pi (1.5R) \left(\frac{\rho}{2}\right) G.
\]
Simplifying \( g_B \):
\[
g_B = \frac{4}{3} \pi (1.5R) \cdot \frac{\rho}{2} \cdot G = \frac{4}{3} \pi R \rho G \cdot 1.5 \cdot \frac{1}{2}.
\]
The ratio of \( g_B \) to \( g_A \) is:
\[
\frac{g_B}{g_A} = \frac{(1.5)^2}{1} \cdot \frac{\frac{\rho}{2}}{\rho} = \frac{(1.5)^2}{2} = \frac{2.25}{2} = \frac{3}{4}.
\]
Thus, the ratio of acceleration due to gravity at the surface of B to A is \( \boxed{3:4} \).