Proof (pumping lemma for context-free languages)
Let $G = (Σ, N, P, S)$ be a context-free grammar producing $L$, and we can choose $G$ to be in Chomsky normal form by possibly losing $ε$. Choose $n = 2^{|N|+1}$.
If $u\in L$ has length $\geq n$, then the parse tree has height $\geq |N|+2$, meaning there is a path consisting of non-terminal symbols from the root of length $\geq |N|+1$. By the pigeonhole principle, the bottommost $|N|+1$ non-terminal symbols of this path must contain a repeated symbol, say $A$ at a root of subtree $\mathbf{T}'$ and sub-subtree $\mathbf{T}''$.
Then $u = vwxyz$, where $x$ is the word of $\mathbf{T}''$ and $wxy$ is the word of $\mathbf{T}'$. Since $\mathbf{T}'$ has height at most $|N|+2$, its word $wxy$ has length at most $2^{|N|+1} = n$. Moreover $\mathbf{T}'$ has another outgoing edge not towards $\mathbf{T}''$, so $|wxy|>|x|$.
To pump down, replace $\mathbf{T}'$ with $\mathbf{T}''$, resulting in a parse tree for $vxz$. To pump up, replace $\mathbf{T}''$ with $\mathbf{T}'$, resulting in a parse tree for $vwwxyyz$.