Axiom $3.6$ (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 апy object $z$, $$ z\in \{y : P(x, y)\text{ is true for some } x \in A\} \iff P(x,z)\text{ is true for some } x \in A.$$
Axiom $3.5$ (Specification). Let $A$ be a set, and for each x$\in$ $A$, let $P(x)$ be a property pertaining to $x$ (i.e., $P(x)$ is either a true statement or a false statement). Then there exists a set, called $\{x \in A : P(x) \text{ is true}\}$ (or simply $\{x \in A : P(x) \text{ for short}\}$), whose elements are precisely the elements $x$ in $A$ for which $P(x)$ is true. In other words, for any object $y$, $$у \in \{x \in A: P(x)\text{ is true}\} \iff (y \in A \text{ and } P(y)\text{ is true}).$$
I have to show that $3.6\implies 3.5.$
Proof: By $(3.6)$ we can assume the following set $$\{x:P(x,x)\text{ is true for some }x\in A\}.$$ Let $Q(x)=P(x,x)$ then we get the set $$\{x\in A:Q(x) \text{ is true for some }x\},$$ which is what $(3.5)$ wants. Is this proof correct?
PS. I have read other answers to this question on MSE, but none of them use this formulation of the axiom and I guess use more formal notation. I am learning from Tao's Analysis book and so I've not been introduced to such notation.