Yes, take $Y=\\{x-Px:x \in B\\}$. Then any point $x \in B$ is $Px + (x-Px) \in X+Y$. If $x \in X \cap Y$ then $x=Pz$ for some $z$. Since $P^{2}=P$ we see that $P$ vanishes on $Y$. Hence $Pz=0$ so $x=0$. Finally we have to show that $Y$ is closed. Let $x_n-Px_n \to u$. Since $P$ is continuous we get $$0=Px_n-P^{2}x_n=P(x_n-Px_n) \to Pu.$$ Thus $Pu=0$ and $u=u-Pu \in Y$. Hence $Y$ is closed.