In my reading of Kant's CPR (I mention this because I don't want an answer according to his other critiques), I don't seem to understand on what basis is Kant distinguishing statements in math and statements in theology.
For instance, it is a synthetic a priori judgement to say that sum of all angles of a triangle amount to 180 degrees. To arrive at this, one has used pure concepts of understanding and applied them to a triangle (consistently), and one can do this without needing posteriori experiences since the concept of triangle can be purely a priori. In this specific example one has utilized the concept of space, for example, and made a thesis - this Kant would call legitimate (it's how science and math operate).
However, he then becomes critical of metaphysics which applies concepts of understanding in a way that he says transgresses the limit of reason. My question is if all we use are concepts of understanding (we don't have any other way of discourse) to establish anything, given that the derivation remains consistent with these concepts, why is he critical of these metaphysical statements? I understand, for example, how a specific thesis in metaphysics is erroneous, for instance the ontological proof is erroneous because it assumes existence to be a necessary predicate. However, how can he say that reason necessarily leads us to error? If it did lead us to error, we could just realize the error that we made using the same concepts of understanding, correct?
Kant however is not saying that this particular or that particular argument is fallacious, he is saying it was inevitable that they would be fallacious because they were using the concepts of understanding outside their scope - this is the point I am not able to grasp. What is the scope exactly? How is thesis on God outside the scope and angles of a triangle inside the scope? Or perhaps I misread his argument entirely.
In summary, what distinguishes the synthetic a priori judgements of Math (180 degree rule), and other metaphysical discussions of God (like in Aquinas for instance).
NOTE: It'll be great if you could answer in reference to CPR only. I understand there will definitely be philosophies that would repudiate the presuppositions of Kant itself, but I want to understand his specific viewpoint as of now.