In "Linear Algebra Done Right" by Sheldon Axler:
Theorem 2.18:
If $U_1$ and $U_2$ are subspaces of a finite dimensional vector space, then:
$\dim(U_1+U_2)=\dim(U_1)+\dim(U_2)-\dim(U_1 \cap U_2)$
PROOF (in short):
Let $(u_1,u_2,...)$ be a basis of $U_1\cap U_2$. This can be extended to a basis $(u_1,u_2,...,u_m,v_1,v_2,...,v_j)$ of $U_1$. Also, it can be extended to a basis $(u_1,u_2,...,u_m,w_1,w_2,...,w_k)$ of $U_2$.
Clearly $\text{span}(u_1,...,u_m,v_1,...,v_j,w_1,...,w_k)$ is $U_1 + U_2$. To show that this list is a basis of $U_1+U_2$ we just need to show that it is linearly independent.
To prove this, suppose:
$a_1u_1+...+a_mu_m+b_1v_1+...+b_jv_j+c_1w_1+...+c_kw_k=0$
$\implies c_1w_1+...+c_kw_k = -(b_1v_1+...+b_jv_j+a_1u_1+...+a_mu_m)$
This shows that $c_1w_1+...+c_kw_k \in U_1$ which is evident looking at the right hand side of the previous equality.
However, after this the book says: "All the $w$'s are in $U_2$, so this implies that $c_1w_1+...+c_kw_k \in U_1\cap U_2$"
I am having trouble understanding this statement. We had to extend $(u_1,u_2,...)$ to $(u_1,u_2,...,u_m,w_1,w_2,...,w_k)$ in order to cover the region of whole region of $U_2$ (i.e. include the regions outside of $U_1\cap U_2$ in $U_2$). So it should mean that $(w_1,w_2,...,w_k)$ is basis of $U_2-U_1\cap U_2$. But they claim that $c_1w_1+...+c_kw_k \in U_1\cap U_2$ which seems contradictory!
Am I making any conceptual error?