We know that Interest = Principal x Rate x Time
No Time is specified here, so we will assume that Time = 1 year.
Rate will be expressed as a decimal.
So, what we have here is that $1150 = Principal 1 x 0.05 + Principal 2 x 0.08. Further, we know that Principal 2 = $22,000 - Principal 1
Let x = Principal 1; then $20,000 - x = Principal 2
Our equation becomes $1150 = 0.05x + 0.08($20,000 - x)
expanding, we get $1150 = 0.05x + $1600 - 0.08x
combining, we get -$450 = -0.03x
multiply both sides by -1 to get $450 = 0.03x
solving, x = $15000
So, Principal 1 = $15000, and Principal 2 = $5000
Proof: $15000 x 0.05 + $5000 x 0.08 = $1150
$750 + $400 = $1150