The sentences
if one has some set $I$, and for every element $\alpha \in I$ we have some set $A_\alpha$
and
we often refer to $I$ as an index set, and the sets $A_\alpha$ are then called a family of sets, and are indexed by the labels $\alpha \in I$
are intuitively clear, but mathematically not very precise. Indeed, a few pages later Tao spends some time in introducing the concept of an ordered $n$-tuple which is nothing else than a family of objects $x_i$ indexed by the set $\{1,\ldots, n\}$. This shows that the general conecpt of a family is not that trivial as it looks at first glance. For $n$-tuples Tao goes even deeper in an exercise; see functional definition of tuples (Terrence Tao Analysis, execise 3.5.2)
Anyway, let us not further discuss this point.
Here is Tao's axiom of replacement:
Let $A$ be a set. For any object $x \in A$, and
any object $y$, suppose we have a statement $P(x, y)$ pertaining to $x$ and $y$, such that for each $x \in A$ there is at most one $y$ for which $P(x, y)$ is true. Then there exists a set $\{y : P(x, y) \text{ is true for some } x \in A\}$, such
that for any object $z$,
$$z \in \{y : P(x, y) \text{ is true for some } x \in A\} \\\Longleftrightarrow P(x, z) \text{ is true for some } x \in A.$$
In the original formulation of your question you wrote $\{y : P(x, y) , x \in A\}$ instead of $\{y : P(x, y) \text{ is true for some } x \in A\}$ which is too sloppy because you replaced the existential quantifier "for some" (cf. Tao's Appendix A.4) by a comma.
To apply the axiom of replacement, Tao works with the following statement $P(\alpha, y)$ applicable to any object $\alpha \in I$ and
any object $y$ :
- $P(\alpha, y)$ holds true iff $y = A_\alpha$.
Now we can use the axiom of replacement for the set $I$ and the statement $P(\alpha, y)$ and get the set
$$\{y : P(\alpha, y) \text{ is true for some } \alpha \in I \} = \{ y : y = A_\alpha \text{ is true for some } \alpha \in I\}$$
which is simply denoted by
$$\{A_\alpha : \alpha \in I\} .$$
Note that the above approach works for any family of objects $y_\alpha$ indexed by $\alpha \in I$; we do not need to assume that the $y_\alpha$ are sets. We always get the set
$$\{y_\alpha : \alpha \in I\} .$$