The density of an object is the amount of mass per unit volume. The idea of putting the stone into the water in a graduated cylinder is that this tells you the volume of the stone. Since the water raised increased from the 2 mL mark to the 7 mL mark after putting it in the cylinder, the volume of the stone must be equal to 5 mL of water. At room temperature, 1 mL of water has the same volume as 1 cubic centimeter (cm^3), so the stone also has a volume of 5 cm^3.
To get the density, divide the mass of the stone by its volume:
D = m/v = (25 g)/(5 cm^3) = 5 g/cm^3
The density of the stone is 5 grams per cubic centimeter.
Hope this helps!