You can
put this solution on YOUR website!The formula is

For 5 year investment:

yrs

(semi-annually)

------------------------
For 3 year investment:

(quarterly)

------------------------------
If I read the problem right,

, the earnings
after 5 years, will become

, the principle
invested for 3 years
given:

--------------------
substituting:

and

The original principle invested is $12,264.76
Hope I got it right