Assumptions for above case:
1-Equal payments are made monthly.
2-Total amount deposited throughout the year are compounded by end of the year.
3-Annual interest is 6%
4-Total Amount invested plus interest at maturity are reinvested the following year.
Given above, if you create a table in excel for those calculations, you would get $296.330 /month which amounts to $12,000.00 in 3 years approximately.
Year 1 = $3,555.96 Pre-interest =>$3769.32 Post 6% interest
Year 2 = $7,325.28 Pre-interest =>$7,325.28 Post 6% interest
Year 3= $11,320.75 Pre-interest =>$12,000.00 Post 6% interest.
The way to calculate pre interest for each year is just $296.330*12=$3555.96
Afterwards just multiply by the annual interest rate to get the full amount invested + interest (6%) =>$3555.96*(1.06)= $3769.32
Then As per step 1, add another 3555.96 and multiply it all by 1.06, to get 305.06
x = $305.06