Before to going to college, Carlos had saved up $3000. Part of it was invested at 7% and the remainder 9%. At the end of one year he had earned $242 in interest. How much dud he invest at each time.

Let x be the amount of money Carlos invested at 7%.

Therefore, the amount of money Carlos invested at 9% is $3000 - x.
The interest earned from the investment at 7% is x * 0.07.
The interest earned from the investment at 9% is ($3000 - x) * 0.09.
The total interest earned is x * 0.07 + ($3000 - x) * 0.09 = $242.
0.07x + 0.09($3000 - x) = $242.
0.07x + $270 - 0.09x = $242.
-0.02x = -$28.
x = -$28 / -0.02 = $1400.
The amount of money Carlos invested at 7% is $1400.
The amount of money Carlos invested at 9% is $3000 - $1400 = $1600. Answer: \boxed{1400}.