The missing piece for you seems to be the fact that Kant builds on the idea of "architectonic" borrowed from Aristotle, as he mentions in the paragraph following the first OP quote:"Borrowing a term of Aristotle, we shall call these concepts categories, our intention being originally the same as his, though widely diverging from it in its practical application". Aristotle already "derived" a list of categories in his formal logic by classifying judgments, and Kant took Aristotle's logic as gospel, "to the present day this logic has not been able to advance a single step, and is thus to all appearance a closed and completed body of doctrine" (Preface to the second edition of CPR). So his job was merely to adapt the Aristotelian classification to his transcendental perspective. Here is an SEP commentary on how he managed it:
"Kant begins from Aristotelian logic in outlining four respects in which one can classify any judgment: according to its quantity, quality, relation, or modality. In each of these respects or ‘moments’ of judgment, there are three alternative classifications; thus, e.g., in respect of quantity, a judgment may be universal, particular, or singular; in respect of its relation, a judgment may be categorical, hypothetical, or disjunctive, and so on.
These Aristotelian ways of classifying judgments are the clue to discerning the twelve correlated concepts of the understanding. So, e.g., from noting that all judgments are either universal (e.g., All swans are white), particular (e.g., Some swans are white) or singular (e.g., Cygmund is white), we can arrive at the three corresponding categories of quantity: unity, plurality, and totality. Via this route, Kant ultimately distinguishes twelve pure concepts of the understanding (A80/B106), divided into four classes of three..."
As for the first OP quote, it rather refers to the overall scheme of the architectonic rather than the specific task of deriving categories from logic. Kant's conception of the architectonic is different from Aristotle's, where the categories are supposed to reflect the most general structures of reality (Kant borrowed the term from Baumgarten, where it had similar metaphysical meaning). In the spirit of the "Copernican revolution", it is not the categories that conform to the reality, but rather the reality is experienced in conformity with the categories. But this turning around leaves the formal category/judgment relations essentially intact, so given the forms of judgment Kant does not dwell much on deriving the categories from them. Here is an explanation of Kant's grand vision of the unifying architectonic in Friedman's Parting of the Ways, Ch.9, which I find illuminating:
"In the original Kantian architectonic, what Kant calls pure general logic (traditional Aristotelian formal logic) constitutively frames the entire
system at the highest level. The traditional logical theory of concepts, judgments, and inferences supplies the formal systematic scaffolding on which Kant's comprehensive synthesis is constructed. The logical forms of concepts and judgments, when schematized by the faculty of sensibility, generate both the table of categories and the system of principles, which in turn underlie Kant's constitutive theory of human sensible experience of the phenomenal world, as made possible in pure mathematics and pure natural science.
These same logical forms, considered independently of the faculty of sensibility, then generate the concept of the noumenon, which remains merely "problematic," however, from a theoretical point of view. Further, the basic logical forms of (syllogistic) inference, again considered independently of sensibility, generate the idea of the unconditioned in general and the idea of freedom in particular. And both of these ideas also remain "indeterminate" from a theoretical point of view, although they nonetheless possess positive guiding force in the regulative use of reason. This same faculty of reason, finally, when applied to the determination of the will, also generates the moral law as a product of pure practical reason... For Kant himself, therefore, the systematic unity of all forms of thought-theoretical, practical, aesthetic, and religious - is grounded on the idea that it is ultimately the very same reason at work in all cases."
Peirce, who spent perhaps the most time analyzing Kant's derivation of the categories (three hours a day for two years, he says), and modeled his architectonic on Kant's, ended up reproaching Kant for the same thing Kant reproached Aristotle for, lack of principle:
"Kant first formed a table of various logical divisions of judgement, and then deduced his categories directly from these... The correspondences between the functions of judgement and the categories are obvious and certain. So far the method is perfect. Its defect is that it affords no warrant for the correctness of the preliminary table, and does not display that direct reference to the unity of consistency which alone gives validity to the categories."
Indeed, the parallelism between the two tables in CPR is rather transparent. The "principle" Kant claims distinguishes him from Aristotle, who "merely picked them up as they occurred to him", and provides the warrant of completeness to the categories, is in using the table of forms to derive the table of categories. But the former is ostensibly derived from syllogistic predication, not unlike Aristotle's, concepts being essentially identified with predicates. Peirce, after he learned of de Morgan's logic of relations and himself discovered detachable quantifiers, had to scrap his original list of categories, and start from scratch, see Murphey's Development of Peirce's Philosophy.
Is Aristotle's/Kant's derivation of the categories convincing? Not today. Kant vastly overestimated the completeness of his time's logical doctrines, as 19-th century logicians soon demonstrated with propositional algebra, multi-place predicates and detachable quantification. The list which seemed "exhaustive" under logic, where all one could do is predicate to a subject with glued-in quantifier, does not seem that so much anymore. To us appeals to the syllogistic seem like a mere analogy, if that, but to Kant it looked like the a priori structure of reason made flesh.