Answer
${{\$}} 6000$ was invested and earned $ 12\%$ interest, and
${{\$}} 2000$ was invested at $ 5\%$ loss.
Work Step by Step
Let $ x $ = amount invested at $ 12\%$ interest.
Interest earned from the $ 12\%$ paying account = $0.12x $
The rest of the investment, $(8000-x)$ "earns" $-5\%$, which equals $\qquad $
$-0.05(8000-x)$
The sum of these amounts earned is ${{\$}} 620:$
$0.12x-0.05(8000-x)=620$
$0.12x-400+0.05x=620$
$0.17x=620+400$
$0.17x=1020 \qquad $ ... multiply with $\displaystyle \frac{100}{17}$
$ x=6000$
So, ${{\$}} 6000$ was invested and earned $ 12\%$ interest, and
${{\$}} 2000$ was invested at $ 5\%$ loss.