The can of diet soda is less dense than water, so it floats. The can of regular soda (water with lots of dissolved sugar) is more dense than water, so it sinks. This is discussed on page 251. The weight of the floating can of diet soda is equal and opposite to the buoyant force that acts on it. If it momentarily sank deeper into the water, it would displace more water and the buoyant force would increase and push it upward. So it floats, at the point where the buoyant force and the weight are equal and opposite.