How can I prove this language is not context-free?
You can force the pumping to be in some places, using Ogden's lemma, for example by marking all the 0's.

Suppose it is context free, then Ogden's lemma gives you a $p&gt;0$, you give it $w=0^p1^p2^p$ which is in the language, and you "mark" all the 0's. Then any factorisation $w=uxyzv$ must be such that there is a $0$ in $x$ or $z$. You can also assume $x=a^k$ and $z=b^m$ since $xx$ and $zz$ must be substrings of your language.


If $z=0...0$ then $w=ux^2yz^2v$ has more 0's than 1's
If $x=0..0$ and $z=1..1$ then $w=ux^2yz^2v$ has more 1's than 2's.
If $x=0..0$ and $z=2..2$ then $w=ux^2yz^2v$ has more 0's than 1's.


So $ux^2yz^2v$ is not a word of your language. Therefore, it is not context-free.

For other techniques, see the discussion: How to prove that a language is not context-free?