Note that in the proof

the set B should be {A - X | X ispropersubset of A}. Otherwise, B includes the empty set (in fact, B = P(A)) and AC' is not applicable to B.

We can define f to be what we want on A. On proper subsets, f returns an element from the complement. On A itself, it may return some special flag indicating that g is not applicable to A. (Since everything is a set, the flag has to be a set as well.) In this case, one chose the flag to be A itself.