You're putting in A millilitres of 3% salt and 97% water, and B millilitres of 12% salt and 88% water.

So your final solution (no pun intended) will be 1000 millilitres made up of 8.4% salt and 91.6% water.

So A*0.03 + B* 0.12 = 84, pairing the salts with the salts.

And

A*0.97 + B*0.88 = 916, pairing the water with the water.

So you're left with a pair of simultaneous equations to solve.