It is false. The simplest counterexample is to let $V$ be any vector space of dimension $\geq1$, and let $U=\{0\}$ (the trivial subspace) and $W=V$. We have $U=U\cap W=\{0\}$ is of dimension $0$ and $W=V$ is of dimension $\geq 1$, so a basis for one cannot be a basis for the other.
More generally, if $A$ is a vector space, $B\subseteq A$ is a subspace of $A$, and $\{x_1,\ldots,x_n\}$ is a basis for both $A$ and $B$, then in fact $A=B$. This is because $\{x_1,\ldots,b_n\}\text{ is a basis for }A\implies A=\text{span}(x_1,\ldots,x_n)$ $\{x_1,\ldots,x_n\}\text{ is a basis for }B\implies B=\text{span}(x_1,\ldots,x_n)$ hence $A=B$. Using this observation, we see that a basis for $U\cap W$ is a basis for $U$ if and only if $U=U\cap W$, and it is a basis for $W$ if and only if $W=U\cap W$, so it is a basis for both $U$ and $W$ if and only if $U=W$.