For compound interest compounded anually,
$A= P\left (1+ \frac{r}{100} \right )^n$
Given $A= 2P$ when $n=6$
$\implies 2P= P\left (1+ \frac{r}{100} \right )^6$
$\implies 2= \left (1+ \frac{r}{100} \right )^6$
$\implies 2^{\frac{1}{6}}= \left (1+ \frac{r}{100} \right )$
$\implies 1.122= 1+ \frac{r}{100}$
$\implies 0.122= \frac{r}{100} $
$\implies r= 12.2\ \% $
Now $A= 16P$ then $n= ? $
$A= P\left (1+ \frac{r}{100} \right )^n$
$\implies 16P= P\left (1+ \frac{12.2}{100} \right )^n$
$\implies 16= \left (1+ \frac{12.2}{100} \right )^n$
$\implies 16= \left (\frac{112.2}{100} \right )^n$
$\implies 16= \left (1.122 \right )^n$
$\implies n= log_{1.122}16 = 24.08 \approx 24$
$\therefore$ Option $B.$ is correct.