If you invest $1000 at 3% interest compounded semiannually. when will the investment be worth $1500 ?

1000(1 +.03/2)^q= 1500

not sure if this is right ?
thanks

correct, but remember that q will be half-years

so you will have to divide q by 2 to get the number of years