urgen linear equation help INVESTMENTS gr. 10!

hey

im having an issue with a word problem for investments (linear equations)

any tips on how to solve these?

for example this one:

a principal of $2500 is invested; part at 8% annum and the rest at 12% annum. In one year, the two investments earned equal amounts of interest How much was invested at each rate?

im having my exam tomorrow so yah

any tips for linear equations will be appreciated!!!!

and also i heard there was a forumla for investments. would anybody mine explaining to me what it is? and hwo does it work?

thanks!