.
Invested x at 8% and (50000-x) at 12%.
0.08x + 0.12*(50000-x) = 5000
0.08 + 0.12*50000 - 0.12x = 5000
-0.04x = 5000 - 0.12*50000 = -1000.
x = = 25000.
Answer. rs 25000 was invested at 8% and rs50000 - rs25000 = rs 25000 was invested at 12%.
The solution by @josgarithmetic is WR O N G.
For your safety, simply ignore it.
================
Since @josgarithmetic changed his post after my noticing,
below is what was written in the @josgarithmetic solution when I noticed his error (a copy)
Invested x of rs at 8% and 50000-x at 12%
-
-----------rs at 8%.
===========================