Solution (source code)

= Solution

The <color excess> is $E(B-V)=0.3-0.2=0.10$ mag, hence $A_V=0.31$ mag. The observed modulus $V-M_V$ is 15.4, while the extinction-corrected modulus is $\boxed{\mu_0=15.09}$. Thus $\boxed{d=10^{(\mu_0+5)/5}\simeq1.04\times10^4\ \mathrm{pc}}$. Distinguishing the apparent and true moduli avoids treating extinction as extra distance.