solution
You use this formula to get the amount invested in each account
Let the amount invested in the first account be p, then the amount invested in the second account is $5000-p
This gives us
P(1.03)+($5000-p)1.04=$5000+$185
1.03p+$5200-1.04p=$5185
$5200-$5185=0.01p
$15=0.01p
P=$15/0.01
P=$1,500
Therefore
In the first account the student invested amount $1,500 and in the second account, the student invested amount $3500