Let $X$ be a Banach space and suppose $V$ and $W$ are two subspaces of $X$ such that $V\subset W$. Also, both $V$ and $W$ are closed subspaces of $X$.[Edited according to @G.Sassatelli's answer] To prove $V=W$, it suffices to show that any continuous linear functional on $W$ which vanishes on $V$ is identically equal to $0$.
This is an argument made in a proof in Temam's Navier Stokes Equations(page 13). Would anybody explain the "it suffices to show" part?
If $V$ is not closed, it's not true: namely, pick $W=\overline V$.
If $V$ is closed and $x\in W\setminus V$, Hahn-Banach guarantees the existence of a continuous functional $\phi\in W'$ and $\alpha\in\Bbb R$ such that $\phi(x)>\alpha$ and $\phi(y)<\alpha$ for all $y\in V$. Now, let's prove that, actually, $V\subseteq \ker \phi$. Suppose $\phi(y)\ne0$ for some $y\in V$, then $$\phi\left(\frac{\lvert \alpha\rvert+1}{\phi(y)}y\right)=\lvert \alpha\rvert+1>\alpha\\ \frac{\lvert \alpha\rvert+1}{\phi(y)}y\in V$$ Which contradicts the constructive hypothesis of $\phi$. So, $\phi$ is a continuous functional on $W$ which is $0$ on $V$ but not on the whole $W$.