Preface: Kant's assertion is rebutted by Prof David Joyce who references non-Euclidean geometry and by the last sentence on Sparknotes which states that 'empirical geometry is synthetic, but it is also a posteriori'. So I explain why maths appears a posteriori to me using high school mathematical examples that should be easy enough for Kant.
[Source :] For Kant, mathematical judgments have an intrinsic connection to space and time. He thinks of math as involving geometry and arithmetic, and the basis of geometry being the quantity we apprehend as extension in space while the basis of arithmetic is the quantity we apprehend as extension in time. Accordingly, for Kant the question about the nature of math's bases becomes the question about the nature of our apprehension of the quantities of spatial and temporal extension.
So, on the basis of taking space and time to have an a priori source he infers that mathematics has an a priori source. But the nature of this a priori source, on his view, is not merely one of recognizing the content of concepts we already possess (like when we judge that a bachelor is unmarried), but rather has its basis in our capacity to synthesize spatial or temporal extension in order to arrive at propositions describing geometric or arithmetic quantities. So, by taking mathematical judgments to be acts of syntheses involved our apprehension of space and time, he takes them to be synthetic a priori.
Understanding and so not challenging that
maths is synthetic (eg: Can anyone solve the cubic equation at first sight without doing any algebra?)
and elementary school maths appears a priori to an adult,
I challenge only that maths is a priori at a high-school and university level.
Suppose that a maths student can correctly prove or quantify a concept (eg: the Möbius strip (picture), Principal Component Analysis (picture) or an equation that can be proven visually), but pictures or intuitive explanation enriches this knowledge to the next level. Then all such students learn maths only AFTER exposure to these intuitive explanations and visualisations, and so maths must sometimes be a posteriori. Correct?