X is the amount invested at 6%
Y is the amount invested at 9%
0.06X + 0.09Y = 4998
X = 2Y
0.06(2Y) + 0.09Y = 4998
.12Y + 0.09Y = 4998
0.21Y = 4998
21Y = 499800
Y = 499800/21 = 23800
So X = 2*23800 = 47600
$47,600 is invested at 6% and $23800 is invested at 9%