We want to find a formula for G.
First step: multiply both sides by (1-G)
[tex]\begin{gathered} (1-G)Q=(1-G)\frac{p}{1-G} \\ (1-G)Q=p \end{gathered}[/tex]Second step: divide both sides by Q
[tex]\begin{gathered} \frac{(1-G)Q}{Q}=\frac{p}{Q} \\ 1-G=\frac{p}{Q} \end{gathered}[/tex]Third step: subtract 1 from both sides
[tex]\begin{gathered} 1-G-1=\frac{p}{Q}-1 \\ -G=\frac{p}{Q}-1 \end{gathered}[/tex]Final step: multiply both sides by -1
[tex]\begin{gathered} (-1)\cdot(-G)=(-1)\cdot(\frac{p}{Q}-1) \\ G=1-\frac{p}{Q} \end{gathered}[/tex]