show that $\operatorname{rank}(g\circ f) \leq \operatorname{rank}(f)+\operatorname{rank}(g)-n$ Let $E$ a vector  space and $\dim(E)=n$
and let $f,g \in L(E)$
show that $\operatorname{rank}(f\circ g) \leq \operatorname{rank}(f)+\operatorname{rank}(g)-n$
I can see that $\operatorname{Ker}(g) \subset \operatorname{Ker}(f\circ g)$ 
so  $\dim \operatorname{Ker}(g) \leq \dim \operatorname{Ker}(f\circ g)$
by the rank-nullity theorem  $\operatorname{rank}(g) \leq \operatorname{rank}(f\circ g)$
I am stuck here.

The reverse inequality is true. To see it, apply the rank-nullity theorem twice. $\DeclareMathOperator{\Im}{Im}$
Observe in the first place that $$\DeclareMathOperator{\rk}{rank}\rk(g\circ f)=\rk\Bigl(g_{\,\bigm\vert_{\,\scriptstyle\Im f}}\Bigr)\quad\text{and}\quad 
\ker\Bigl(g_{\,\bigm\vert_{\,\scriptstyle\Im f}}\Bigr)=\ker g\cap\Im f, $$ 
so, by the rank-nullity theorem
$$\rk(g\circ f)= \dim(\Im f)-\dim(\ker g\cap\Im f)=\rk f-\dim(\ker g\cap\Im f). $$
Now $\;\ker g\cap\Im f\subset \ker g$, whence
$$\dim(\ker g\cap\Im f)\le \dim(\ker g)=n-\rk g, $$
and therefore
$$\rk(g\circ f)\ge\rk f-(n-\rk g).$$
