acceleration due to gravity at height h is given as
g' = g (1 - 2h/R)
acceleration due to gravity at a depth r is given as
g'' = g(1 - r/R)
now we are given that g' = g''
so,
g (1 - 2h/R) = g(1 - r/R)
or
(1 - 2h/R) = (1 - r/R)
=> 2h/R = r/R
or
h = r/2 = 100/2 = 50 km