The solution would be like this for this specific problem:
8479 = P * (1 + 0.09/2)^(2 * 6)
8479 = P * (1 + 0.045)^12
8479 / (1.045)^12 = P
P = 4999.7599101968641899706115543368
If the money was invested at 9% interest compounded semiannually, the initial investment is $5000. I am hoping that this answer has satisfied your query and it will be able to help you in your endeavor, and if you would like, feel free to ask another question.