Pumping lemma to show a language is not context free
First language: $0^{p}1^{p}2^{p^2}$ - If we make $0$ or $1$ longer, $2$ must get longer too to satisfy the condition of the language. Because of $|vwx|\le p$ $v$ cannot contain $0$ when $x$ contains $2$. Also if either $v$ or $x$ contained two different symbols, we know that it would break the language (there would be a sequence of e.g. $0^{i}1^{k}2^{l}1^{m}2^{n}$ with $l,m &gt; 0$).
The last possibility is when $v$ is of form $1^k$ and $x$ of form $2^{l}$. We will prove by contradiction that this is impossible too. We would need such $k, l&gt;0$ that the next equation holds for all $i \ge 0$
$$p(p+i\cdot k) = p^{2}\cdot i \cdot l \\
p^{2} + p\cdot i \cdot k = p^2 \cdot i \cdot l \\
l = \frac { p^2 + p \cdot i \cdot k }{p^2 \cdot i} \\
l = \frac {1}{i} + \frac {k}{p} $$
From $|vwx|\le p$ and $k,l&gt;0$ we know that $k&lt;p$. Similary $\frac{k}{p}&lt;1$ and $\frac{1}{i} &lt; 1$ for $i &gt; 1$. From those and the fact that $l$ is natural number, the only possible value of $l$ is $1$. That would mean
$$p^{2} + p\cdot i \cdot k = p^2 \cdot i \\
k = \frac{p \cdot i - p}{i} \\
k = p - \frac{p}{i}$$

There are two problems with this: first it would hold only when $i$ divides $p$ and $k$ would be dependant on $i$ but has to be a constant. Thus we have proved this is impossible too and the lemma is complete.



For the second language, I believe it is pretty difficult example I and I would advise you to first try some easier languages, if you have just started using the lemma.

You can chose for any $p$ a string $0^{0}10^{1}10^{2}1...10^{p-1}10^{p}$ and then you have to enumerate all the possibilities and prove they don't hold for some $i$.


Either $x$ or $v$ contains two (or more) $1$'s - then it also contains $10^m1$ so with $i&gt;1$ the pumped string will contain two $x_m$'s so it will not be from $L$.
Both $x$ and $v$ contain no $1$'s - with $i=0$ the substrings $x_m$ and $x_n$ containing $x$ and $v$ respectively will get shorter. Since the original string $s$ contained all shorter strings $x_k$ at least one of them will colide with some shorter string.
Either $x$ or $v$ contain only $1$. - If that substring is pumped, the new string will contain $...11... = ...1x_{0}1...$, but the original string started with $1... = x_{0}1...$, thus we have a collision.
Either $x$ or $v$ are of form $0^{n}10^{m}$ with either $n$ or $m$ greater than $0$. With $i=3$ we get $...0^{n}10^{n+m}10^{n+m}10^{m}...$ where we immediately see a collision.


I hope I did not forget some special case.