To represent how much we invested in stocks and how much we invested in bonds, we can call these amounts S and B.
We know that S and B add up to $12,000, so we can make an equation
S + B = 12000
We know that stocks gave us 4.8% and bonds gave us 7%, and these gave us $763.
We can create an equation from this information:
.048S + .07B = 763
We can use information from the first equation to help us work with this equation:
Since S+B=12000, we can say something like
S = 12000-B
We can then use this information by substituting 12000-B into S for the second equation, like so:
.048(12000-B) + .07B = 763
This multiplies out to
576-.048B + .07B = 763
We can then combine B terms
576 + .022B = 763
Subtract 576 from both sides
.022B = 187
Lastly, divide both sides by .022
B = 8,500
So we have 8.500 in bonds. That means that
S+8,500=12,000
S = 12,000-8,500
S = 3,500
$3,500 in stocks
$8,500 in bonds