Let $A = \begin{bmatrix} a & b \\ 0 & c\\ \end{bmatrix}, \;\; B = \begin{bmatrix} e & f \\ 0 &g \\ \end{bmatrix}$
where $ac\neq 0,\;\;eg \neq 0$. So $A, B \in G$.
Simply compute $AB= P$ and what to you get? Use the definition of matrix multiplication, and the fact that $ac \neq 0$ and $eg\neq 0$, and check to see if the lower left entry of your product matrix $P$ is, in fact, $0$.
Showing that $\det (AB) = \det(P) \neq 0$ is not your task. In fact, the $\det \begin{bmatrix} m & 0\\n& q\\ \end{bmatrix} \neq 0$ when $m, n, q$ are non-zero, but this matrix is NOT in $G$.
You need to verify that for the entries $p_{ij}$ of $AB = P$:
$p_{11}p_{22} \neq 0.$
$p_{21} = 0$.
Once you've done that, you can conclude $AB = P \in G$.