The mass of the earth can be considered to be at its centre, about 4000 miles below the surface. The force of gravity is inversely proportional to the square of the distance from the centre. If we call this F and the constant of proportionality G, then F=G/x^2 where x is the distance from the centre. When x=4000, F=g, the acceleration of gravity. When F=g/2, what is x? g=G/4000^2 and g/2=G/x^2. Dividing these two equations: g/(g/2)=2=x^2/4000^2.
So x^2=2*4000^2 and x=4000√2=5657 miles approx. But from this we have to subtract the radius of the earth: 5657-4000=1657 miles approximately. A more accurate value may be obtained by using the mean radius of the earth (3979 miles) giving about 1638 miles above the surface.