Let $V$ be a finite-dimensional vector space and $L_1$ and $L_2$ are subspaces of $V$ such that $\dim L_1+\dim L_2=\dim V$. Show that exists linear operator $f$ such that, $$\ker(f)=L_1,\quad \text{Im}(f)=L_2.$$
My approach: Since $L_1$ is a subspace of $V$ then one can define quotient space $V/L_1$ which has dimension $\dim V-\dim L_1=\dim L_2$ and hence $V/L_1\cong L_2$. Suppose $p:V/L_1\to L_2$ is a desired isomorphism. Then one can define the map $f:V\to V$ by equation $f(x)=p(x+L_1)$.
Then it is trivial to check that $f$ is operator with $\ker(f)=L_1$ and $\text{Im}(f)=L_2$.
Is the reasoning correct?
Remark: I was thinking that if $\dim L_1+\dim L_2=\dim V$ then $V=L_1\oplus L_2$ but I've realized that this is false. Indeed, if we take $V=\mathbb{R}^2$ with standard basis and $L_1=L_2=\langle e_1\rangle $. Btw I was not able to come with non trivial example such that $\dim L_1+\dim L_2=\dim V$ but $V$ is not direct sum of $L_1$ and $L_2$. Can anyone give some example?