a) Both the areas with hard packed soil and the areas with looser soil were colonized by animals from the mixed soil area. The hard packed soil area happened to be colonized by animals that by chance had thicker claws, and those with thinner longer claws happened to colonize the areas with less densely packed soil.
b) Each type of environment was probably colonized by gophers with variation in claw type, but over time each individual changed its traits to ones needed to live best in each area so all the gophers in the hard packed soil had only the traits needed to live there and, similarly, because the gophers in the loosely packed soil needed particular traits, they changed their traits to suit that environment.
c) Animals with thick short claws are better able to burrow in dense soil, so in hard packed soil areas those animals with thicker claws were better able to survive and reproduce. In areas with loose soil, animals that thin long claws better for moving larger amounts of soil were the ones most likely to survive and produce offspring.
d) The animals in the hard packed soil areas needed to have claws adapted to hard soil, so a mutation arose to provide that trait. The animals in the less dense soil areas also needed to adapt, so they had a mutation that made their claws suitable for soil in their area.