Let $X,Y$ be Borel spaces and $A\subseteq X\times Y$ be an analytic set. Let $\pi:X\times Y \to X$ denote the projection map onto $X$. Does there always exist a set $B$ such that $\pi(B) = X\setminus \pi(A)$ and such that the union $A\cup B \subseteq X\times Y$ is still analytic?


In particular, $B$ can't be an analytic set (let along Borel) since in such case $\pi(B)$ would be analytic, whereas in some cases $X\setminus \pi(A)$ is co-analytic and not Borel, hence not analytic.



Analytic enlargement of an analytic set
The answer is no, not necessarily. It can happen that there is no such set $B$. 


A counterexample is provided whenever $A$ is a Borel subset of the plane, while the projection $\pi(A)$ is analytic, but not co-analytic. In this case, if $A\cup B$ were analytic, it would follow that $B$ itself is analytic, since $B=(A\cup B)-A$, in light of the fact that $A$ and $B$ must be disjoint since they project to complements. But if $B$ is analytic, as you point out, then $\pi(B)$ would also be analytic, although it is the complement of $\pi(A)$, and this contradicts our assumption that $\pi(A)$ is not co-analytic.


There are numerous concrete counterexamples in the reals $\mathbb{R}$, since every analytic set there is the projection $\pi(A)$ of a Borel set in the plane $\mathbb{R}\times\mathbb{R}$. (Indeed, in the Baire space $\omega^\omega$, every analytic set is the projection of a closed subset of $\omega^\omega\times\omega^\omega$.)


