Hey there! I'm happy to help!
A graduated cylinder is basically a cylinder with little measurements on it.
If we drop the ball into the cylinder and the final volume in 29 instead of 20, this means that the ball has a volume of 9 mL as it took up 9mL of the water, pushing it up 9 mL.
Density is mass divided by volume. The ball has a mass of 27 g and a volume of 9mL. So, the density is 3 g/mL.
Have a wonderful day! :D