Answer: The correct answer is- Allele q will decrease in frequency.
As per the information in the question, allele Q codes for large claws and allele q codes for small claws in a species of wild animal.
This indicates that larger claws will enable the wild animals to burrow more in the ground and find their food. As the change in the climatic condition caused the dirt ( on the ground) to become hard and compact.
This will lead to change in the frequency of allele of the population as allele Q will increase because larger claws will provide more advantage (in context of burrowing) to the animals for getting their food, whereas frequency of allele q will decrease ( as smaller size of claws will not be that beneficial to them in hard and compact ground).