[tex]\bf ~~~~~~ \textit{Compound Interest Earned Amount}
\\\\
A=P\left(1+\frac{r}{n}\right)^{nt}
\quad
\begin{cases}
A=\textit{accumulated amount}\\
P=\textit{original amount deposited}\to &\$500\\
r=rate\to 6\%\to \frac{6}{100}\to &0.06\\
n=
\begin{array}{llll}
\textit{times it compounds per year}\\
\textit{semi-annually, thus twice}
\end{array}\to &2\\
t=years\to &2
\end{cases}
\\\\\\
A=500\left(1+\frac{0.06}{2}\right)^{2\cdot 2}\implies A=500(1.03)^4\implies A=562.754405[/tex]
now, "A" is the accumulated amount, including the earned interest, how much interest was it earned? well, is just A - P.