The value of g decreases on going above and below the earth's surface.
The value of g at a height h above the earth's surface of radius R is given by g′=g(1−RZh)...(1)
The value of g at a depth x below the surface of earth is given by g′′=g(1−Rx)...(2)
Given, g′=g′′ ∴g(1−R2h)=g(1−Rx) ⇒x=2h