Regular grammar is either right linear or left linear. A left linear grammar is one in which there is at most $1$ non-terminal on the right side of any production, and it appears at the left most position. Similarly, in right linear grammar non-terminal appears at the right most position.
Here, we can write a right linear grammar for $G1$ as
$S \rightarrow w(E$
$E \rightarrow id)S$
$S \rightarrow o$
(w - WHILE, o - OTHER)
So, $L(G1)$ is regular.
Now for $G2$ also we can write a right linear grammar:
$S \rightarrow w(E$
$E \rightarrow id)S$
$E \rightarrow id+E$
$E \rightarrow id*E$
$S \rightarrow o$
making its language regular.
So, both $G1$ and $G2$ have an equivalent regular grammar. But given in the question both these grammars are neither right linear nor left linear and hence not a regular grammar. So, D must be the answer.
http://www.cs.odu.edu/~toida/nerzic/390teched/regular/grammar/reg-grammar.html