I am trying to understand the proof of the following Corollary 15.2 in the book Classical descriptive Set Theory by Kechris.
Corollary: Let $X$, $Y$ be standard Borel spaces and $f:X\rightarrow Y$ be Borel. If $A\subseteq X$ is Borel and $f|_A$ is injective, then $f(A)$ is Borel and $f$ is a Borel isomorphism of $A$ with $f(A)$.
So in other words, the Corollary says that $f(A)\in\mathcal{B}(Y)$ and that even $f:(A, \mathcal{B}(A))\rightarrow (f(A), \mathcal{B}(f(A)))$ is bijective, measurable and with measurable inverse.
It is a Corollary of the following Theorem:
Theorem: Let $X$, $Y$ be Polish spaces and $f:X\rightarrow Y$ be continuous. If $A\subseteq X$ is continuous and $f|_A$ is injective, then $f(A)$ is Borel.
Now I try to understand the proof of this corollary because I want to understand the following implication of this corollary: The corollary implies that if the function $f:X\rightarrow Y$ is injective then $f:(X, \mathcal{B}(X))\rightarrow (f(X), \mathcal{B}(f(X)))$ is bijective, measurable and with measurable inverse. And in particular it implies that for every $A\in\mathcal{B}(X)$ it follows that (because if $f$ is injective then every $f|_A$ is injective) $f(A)\in\mathcal{B}(f(X))$. And this is what I don't get because the first statement of the corollary actually only gives us $f(A)\in\mathcal{B}(Y)$.
So to trying to understand this I wanted to understand the proof, which is very short and simply says:
First we can clearly assume that $X$ and $Y$ are Polish. Then we can apply the (above) Theorem to the projection of $X\times Y$ onto $Y$ and the set $(A\times Y)\cap \operatorname{graph}(f)$.
So let this projection be $\operatorname{pr}:X\times Y\rightarrow Y, (x, y)\mapsto y$. Then applying the above theorem to the set $(A\times Y)\cap \text{graph}(f)=\text{graph}(f|_A)$ gives us $\operatorname{pr}\rvert_{\text{graph}(f|_A)}(\text{graph}(f|_A))=f(A)\in\mathcal{B}(Y)$. How does this prove the claim?