Apply pumping lemma to each of these and prove that they are not regular.
$L = \{ (0^p)(1^q)2 \mid 0 < q < p\}$
$L_2 = \{ (a^p)(b^q)(c^r) \mid p = q \text{ or } q = r\}$
Here my bad attempt at $L$.
Proof: Assume $L$ is regular let $m$ be the number from the pumping lemma.
Let $w = 0^m 1^m 2$ this is clearly in $L$.
By the pumping theorem there exist words $w_1$, $w_2$, $w_3$ such that $w = w_1w_2w_3, |w_2|>0, |w_1w_2| \le m$.
This how far I got; it's not very far but the text is far from clear how to do this.
A fairly complete proof that the first language is not regular.
The second language can be shown to be non-regular by assuming $p > 1$ is a pumping length for it. (Note that if $p$ is a pumping length for a language $L$ then every $p^\prime > p$ is also a pumping length for $L$, so the assumption $p > 1$ won't affect whether the language satisfies the conclusion of the Pumping Lemma.) Now look at the string $w = \mathtt{a}^p \mathtt{b}^p \mathtt{c}$.