A cereal mixture contains almonds, wheat, and corn in a ratio of 3:5:7. What is the weight of the mixture if it contains 9 kg of almonds?

The ratio of almonds to the total mixture is 3:15 since the almonds and the mixture contain 3 parts each of almonds, wheat, and corn.

If there are 3 parts almonds and the mixture has 9 kg of almonds, then each part is 9/3=<<9/3=3>>3 kg.
Thus, there are 3+5+7=<<3+5+7=15>>15 parts in the mixture.
The weight of the whole mixture is 15*3=<<15*3=45>>45 kg. Answer: \boxed{45}.