An investor invested a total of ​$3,000 in two mutual funds. One fund earned a 7​% profit while the other earned a 3​% profit. If the​ investor's total profit was ​$142​, how much was invested in each mutual​ fund?