First, just for simplicity let's assume the interest rates X and Y on $9,000 and $6,000 investment written as decimals (later we will convert them to % by multiplying each by factor 100). Based on this assumption, the math problem can be written as following system of 2 linear equations with 2 unknown variables X and Y:
In canonical form:
This system of equations could be solved manually, or using online equations solver (http://examn8.com/SystemOfEquations.aspx)
The answer is X=0.035 and Y=0.3 corresponding to X=3.5% (the rate on $9,000 investment) and Y=3% (the rate on $6,000 investment).
Hope this may help.