Math is, for Kant, synthetic, but apriori. So it is not clear and evident without external information, but it is not learned from external reality, either. (He addresses this as his first major topic in the "Prologomena to Any Future Metaphysics.")
That means it exists only in intuition, as that is the place where our nature and external reality meet. Only when some external reality is interpreted in intuition as having something to do with an overall pattern we are predisposed to seek out, do notions like the perfect square come to exist. The 'square' object is not a square, but neither is it irrelevant to our perception of it as a square. It is a form we shove reality into in the process of forming an intuition.
So geometry is built into people, and we impose it on our perceptions in order to make sense of them. Then we notice an underlying pattern among the perceptions so shaped. And we make that the subject of mathematics.
It is harder to see numbers that way. But Kantian-motivated mathematicians like Brouwer have interpreted the idea of numbers as a part of the intuition of time passing. As we count the three things in front of us, they are differentiated by the fact we focus on each of them at a different time in the counting process, we force them into separate events in memory. So the 'threeness' is not in the objects, it is in the counting process, which is built into our notion of time.
And time goes on within and around this succession of focusses. This is how we get the dual notion of real numbers flowing continuously and integers as fixed points. We feel time pass continuously, but we also clearly identify a specific succession of focal points as the events that happen to us. (Also, contrary to the observations of early anthropologists, everyone can count, even when their language does not have names for the numbers.)
(The labeling process that identifies these points in time is not as clearly connected, as we notice when we try to teach counting to children. Counting in any useful sense requires bringing together two separate kinds of intuition: succession and distinction (which are a priori) and a rule for naming (which is not).)