What state of matter is air is the baseball?
Air is a gas. The baseball is a solid.
A flame is not a substance like water or air. Rather, it is the result of heat and light energy so you can't really say what state of matter it is in. Think of it like this; asking what state of matter a flame is in would be like asking what state of matter light or heat are in. They are forms of energy, not substances.