On days where I'm racing in the afternoon, I eat a bowl of oatmeal with protein-infused granola, two eggs, and couple glasses of orange juice for breakfast. For lunch, usually about 3-4 hours before the race, I eat two Clif bars and a PBJ. If I need any extra energy between then and the race, I bring some trail mix (nuts, raisins, etc.) or eat like half of another Clif bar. I try to leave at least a 2.5-hour period before the race where I don't eat anything to prevent cramps.
This is just what I do, different things work for different people. Whatever makes you feel energized and doesn't give you cramps is what you should eat, not what someone else tells you. Think back to a few past workouts that felt really good, then try to remember what you ate those days. Eat those things.