The volume that is filled with foam is going to be the volume of the container minus the volume of the ball.
The container is a cylinder, so he will need the formula for its volume.
This is [tex]V=\pi r^2h[/tex].
The ball is a sphere, so he will need the formula for a sphere.
This is [tex]V=\frac{4}3\pi r^3[/tex].