Just Distribute the squared to both g and a
[tex](g^3a^4)^2[/tex]
When Distributing an exponent outside the parenthesis you multiply the exponents
Which results in...
[tex]g^6a^8[/tex]