I don't exactly understand your construction of X. But note that you are relying on the existence of ZFC's so-called "powerset", which, as we already know, can be countable. ZFC has no ability to talk about infinite powersets, since it can't and doesn't state that all subsets exist, and thus it doesn't imply the existence of a powerset. Accordingly, both f and X may not be what you want.
> Then you said “Cantor's theorem stating that there is no mapping f from A onto P merely means that the mapping f itself can't exist inside a model of ZFC”. Which is literally identical to saying “under ZFC, there are uncountable sets”.
No, it only means that ZFC can't contain a function f from A to P in its model, which doesn't make P uncountable. (Things can be true even if the theory itself can't express them. E.g. Gödel's second incompleteness theorem says that a theory can't prove its own consistency, but that doesn't mean that the theory is inconsistent.)
For any f and A, we can define X as { a in A | a is not in f(a) } . That set exists in ZFC by the axiom of separation, also known as the axiom of subsets or the axiom of comprehension.
I recommend you pick up a book on ZFC if you are interested in understanding set theory. I found Enderton’s “Elements of Set Theory” to be a really good introductory text.
> Then you said “Cantor's theorem stating that there is no mapping f from A onto P merely means that the mapping f itself can't exist inside a model of ZFC”. Which is literally identical to saying “under ZFC, there are uncountable sets”.
No, it only means that ZFC can't contain a function f from A to P in its model, which doesn't make P uncountable. (Things can be true even if the theory itself can't express them. E.g. Gödel's second incompleteness theorem says that a theory can't prove its own consistency, but that doesn't mean that the theory is inconsistent.)