Since 30% of the bases are guanine, we know that 30% must also be cytosine (because it pairs with guanine in DNA).
Knowing this, we have figured out 60% out of 100%, leaving us with 40%.
Thymine pairs with Adenine, so Thymine and Adenine each make up 20% of the remaining 40% of the DNA in this example.
In total:
Guanine: 30%
Thymine: 20%
Cytosine: 30%
Adenine: 20%