We know that in general, if $X$ is a vector space and $Y, Z, W$ are subspaces such that $X=Y\oplus Z$ and $X=Y\oplus W$ then it may not be true that $Z=W$.
But if we are given further that $Z\subseteq W$, then this should be true. A proof I can think of goes like this: Let $w\in W$. As $X=Y\oplus Z$, we get $w = y+z$ for some $y \in Y$ and $z \in Z \subseteq W$. But also $X=Y\oplus W$ and $w=0+w$, so the uniqueness of the decomposition forces $y=0,z=w$, whence $w=z \in Z$. So $W \subseteq Z$, and equality follows.
Somehow, I feel that there should perhaps be a cleaner and more straightforward way to see that $W=Z$, but I haven't been able to work one out.
My question is: Is there any other way this could be seen more directly?
Edit: Perhaps I should have added that these spaces could be infinite-dimensional.