I'll assume you know how to prove that if then (it is trivial).
Assume U,W are subspaces of V with such that .
Let be a basis for W.
Let (we know one such element exists otherwise since ).
Then u is not spanned by , otherwise it would be an element of W (by definition). Then, is an independent set and obviously and therefore it is a basis of V.
This gives us that .
However, obviously there can be no element in that is not in V since they are subspaces, therefore
By the way, what uni are you studying in?