At first it is saying that the amount is doubled after 6 years compounded annually(by default).
therfore :
$2P = P\left ( 1+ \frac{R}{100}\right)^{6}$
Now the maturity amount means the mone earned is again deposited for next 36 years more ( 42 years from the start)
Hence we get
$A = 2P\left( \left ( 1+ \frac{R}{100}\right)^{6}\right)^{6}$
$A = 2P\left (2 \right)^{6}$
$A = 2P \ast 64$
Here 2P will be the amount deposited now and it will be 64 times after those many years.
Hope it helps.