Prove that $\dim(U+W) + \dim(U\cap W) = \dim U + \dim W$
Just do the computations; the fact that the set spans $U+W$ should be clear, so we prove linear independence.
Suppose $$ \alpha_1v_1+\dots+\alpha_pv_p+ \beta_1u_1+\dots+\beta_qu_q+ \gamma_1w_1+\dots+\gamma_rw_r=0 $$ Then $$ x=\underbrace{\alpha_1v_1+\dots+\alpha_pv_p+ \beta_1u_1+\dots+\beta_qu_q}_{\in U}= -(\underbrace{\gamma_1w_1+\dots+\gamma_rw_r}_{\in W}) $$ belongs to $U\cap W$. Thus $$ x=\delta_1v_1+\dots+\delta_pv_p $$ and therefore $$ \delta_1v_1+\dots+\delta_pv_p=-(\gamma_1w_1+\dots+\gamma_rw_r) $$ so that $$ \delta_1v_1+\dots+\delta_pv_p+\gamma_1w_1+\dots+\gamma_rw_r=0 $$ Since the set $\{v_1,\dots,v_p,w_1,\dots,w_r\}$ is linearly independent, we conclude $$ \delta_1=0,\quad\dots,\quad\delta_p=0,\quad \gamma_1=0,\quad\dots,\quad\gamma_r=0 $$ and also that $$ \alpha_1v_1+\dots+\alpha_pv_p+\beta_1u_1+\dots+\beta_qu_q=0 $$ so, from linear independence of $\{v_1,\dots,v_p,u_1,\dots,u_q\}$ we get $$ \alpha_1=0,\quad\dots,\quad\alpha_p=0,\quad \beta_1=0,\quad\dots,\quad\beta_q=0 $$
A shorter proof: consider $T:U \times W \to U + W$ by $T(u, w) = u - w,$ then $\ker T = U \cap W$ and the theorem of dimension $\dim \ker T + \dim \ \mathrm{image}\ T = \dim\ \mathrm{domain}\ T$ gives the result at once (since $T(U \times W) = U + W$ and $\dim U \times W = \dim U + \dim W$).