Given two subspaces $U,W$ of vector space $V$, how to show that $\dim(U)+\dim(W)=\dim(U+W)+\dim(U\cap W)$
The range of the map $L$ is clearly $U+W$.
Now the nullspace is: $$ \mbox{Ker} \;L=\{(u,w)\;;\; u=w\in U\cap W\} $$ so it is isomorphic to $U\cap W$ via the map $v\longmapsto (v,v)$.
By the rank-nullity theorem applied to $L$, we find: $$ \mbox{rank}\;L+\mbox{null}\;L=\mbox{dim}\;(U\times W) $$ which yields the desired formula, which is sometimes called Grassmann formula..
Hint: assume $\dim ( U \cap W)=k$ and let $B_{ ( U \cap W)}={[x_1,...x_k]}$ then expand this base for W and U let these base are $$B_U={[x_1,...x_k,y_1,..,y_n]}$$ $$B_w={[x_1,...x_k,z_1,..,z_m]}$$ then prove C={$x_1,...x_k$,$y_1$,..,$y_n$,$z_1$,..,$z_m$} is base for W+U you can show C generate W+U and C is independent.