Step 1: Balance gravity against the turning need.
For a satellite skimming the surface, the orbit radius equals the planet radius $R$. Gravity supplies the turning force: \[ \frac{GMm}{R^2} = \frac{m v^2}{R} \]
Step 2: Write the period.
The period is the time for one lap of length $2\pi R$, so $T = \dfrac{2\pi R}{v}$. Solving the balance above for $v$ and putting it in gives \[ T = 2\pi\sqrt{\frac{R^3}{GM}} \]
Step 3: Replace mass using density.
A solid planet has mass $M = \rho\times\tfrac{4}{3}\pi R^3$. Putting this in: \[ T = 2\pi\sqrt{\frac{R^3}{G\,\tfrac{4}{3}\pi R^3\rho}} \]
Step 4: Cancel and read the pattern.
The $R^3$ on top and bottom cancel, leaving \[ T = \sqrt{\frac{3\pi}{G\rho}} \] So $T$ depends only on density, and $T \propto \dfrac{1}{\sqrt{\rho}}$, which is option (B).
\[ \boxed{T \propto \frac{1}{\sqrt{\rho}}} \]