See the example above it, regarding the foundations of a house: that undermining the foundations of his house would cause it to fall can be asserted before he actually did it.
This is not a "real" a priori knowledge, also if we can predict the fall of the house "prior to" the event, because experience is required to know that bodies are heavy and the effects of heaviness.
The "real" a priori knowledge that Kant is defining is knowledge that is prior to all experience, not just prior to some particular experiences.
Kant specifies that by "pure" (i.e. absolute) a priori cognition he means cognition having "no connections with anything empirical.”
In this sense, the statement "Every alteration [i.e. change] has its cause" is not pure in this sense because, according to Kant, the concept of "change" can be derived only from experience of events in time: thus we cannot assert something about change "prior to" every experience.
See also Kant’s Theory of Judgment : A priori judgments and a posteriori judgments :
a cognition is a priori, non-empirical, or absolutely independent of all sensory impressions and/or contingent natural objects or facts just in case it is not strictly determined in its form or in its semantic content by sensory impressions and/or contingent natural objects or facts and is instead strictly determined in its form or in its semantic content by our innate spontaneous cognitive faculties (B2–3).
It should be noted that the apriority of a cognition in this sense is perfectly consistent with all sorts of associated sensory impressions and also with the actual presence of sensory matter in that cognition, caused by contingent natural objects or facts, so long as neither the form nor the semantic content is strictly determined by those sensory impressions and/or contingent natural objects or facts.
“Pure” a priori cognitions are those that in addition to being a priori or absolutely independent of all sensory impressions and/or contingent natural objects or facts, also contain no sensory matter whatsoever (B3). So in other words, some but not all a priori cognitions are pure.
We must consider that, according to Kant, there are judgments and there are concepts, and both can be a priori.
Thus, IMO, the apparent (maybe, real ?) tension in Kant's example can be elucidated this way: a priori judgment must be necessary and strictly universal (B3).
According to this definition, the judgment "Every alteration has a cause", is a priori.
But it is not "pure" because it contains a concept, that of alteration, that is not itself a priori.