If the change in the value of g at a height h above the surface of the earth is the same as at a depth x below it, then (both x and h being much smaller than the radius of the earth)
The value of g at the height h from the surface of earth
The value of g at depth x below the surface of earth
These two are given equal, hence
On solving, we get x = 2h