Mass of removed part, m=Volume of whole sphereVolume of removed part×M=34πR334π(R/2)3×M=8M
The gravitational field E at a distance x from a point mass (or a uniform sphere at a far point) is E=x2GM.
Since P is at a distance x from the center, Etotal=x2GM.
Eremoved≈x2G(M/8)
Enet=Etotal−Eremoved
Enet≈x2GM−8x2GM
Enet≈(1−81)x2GM=87x2GM