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 rate.

Let x be the amount Carlos invested at 7% and let y be the amount he invested at 9%.

We know that x + y = $3000 (equation 1).
We also know that 0.07x + 0.09y = $242 (equation 2).
Solving equation 1 for y, we get y = $3000 - x.
Substituting this value of y into equation 2, we get 0.07x + 0.09($3000 - x) = $242.
Expanding and simplifying the equation, we get 0.07x + $270 - 0.09x = $242.
Subtracting $270 from both sides of the equation, we get -0.02x = -$28.
Dividing both sides of the equation by -0.02, we get x = $1400.
Substituting this value of x into equation 1, we get $1400 + y = $3000.
Subtracting $1400 from both sides of the equation, we get y = $1600.
Therefore, Carlos invested $1400 at 7% and $1600 at 9%. Answer: \boxed{1400, 1600}.