We have the following system of equations, given the information on the problem:
where 'x' represents the money in the account with 2% annual interest and 'y' represents the money in the account with 14%.
We can solve for x the first equation to get the following:
doing the susbtitution on the second equation using this expression, we get:
now that we know the value of y, we can use it to find the value of x:
therefore $12500 was invested at 2% and $19500 was invested at 14%