A = P(1 + r/n)nt
We want the investment to double, so that A = 2P. We also know that r = 0.06 (6% as a decimal value), n=2 (semi-annual). We need to solve for t, the number of years needed to double the investment.
2P = P(1 + (0.06/2))2t
2 = (1.03)2t [Combined terms and divided both sides by P]
To get the t out of the exponent, take the log. I'll use ln (natural log) but you can use log10 or any other base log:
ln(2) = 2t ln(1.03) [ln(1.03)2t = 2tln(1.03)]
ln(2)/2ln(1.03) = t [Use a calculator to compute the logs (ln)]
11.72 = t ≈ 12 years