Suppose x is the amount invested at 7%. The amount of interest earned totals $790.

X*7% + ($12,000 - x)*6% = $790

x*(7% - 6%) + $12,000*6% = $790

x*1% = $790 - $12,000*6%

x = $(790 - 720)/1%

x = $70/.01

x = $7000

X*7% + ($12,000 - x)*6% = $790

x*(7% - 6%) + $12,000*6% = $790

x*1% = $790 - $12,000*6%

x = $(790 - 720)/1%

x = $70/.01

x = $7000