The law of conservation of energy states that in a closed or isolated system, the amount of energy remains constant because energy can neither be created or destroyed. It can only be transferred from one form into another. This applies to all forms of energy.
What’s the rest of the question or is that it?
Anything less dense than water will float, like oil. Anything more dense than water will sink, like rock.
Answer:
They both rises to same height.
Explanation:
When an object is sliding up in friction less surface than according to conservation of energy its potential energy will be converted into kinetic energy.

Here, m is the mass, v is the velocity, g is the acceleration due to gravity and H is the height.
Here the height is independent on the mass of an object and its only depend on velocity.
Now according to the question, two objects have same velocity but they have different masses.
Therefore, they rises to the same height because height will not change with mass.