how do you calculate the formula of the volume of a body with another body inside it?
I'm not certain what you're asking, but I think the answer is
subtract the volume of the inside body from the volume of the outside body
.