The answer begins with the formula for the mass which will be
total mass of the water = (mass density of water) x (Volume of the water)
mtotal = ρwaterVwater
The density is a characteristic of the substance of which the object (the water contained within the cube) is composed. (By the way, the density will depend on the temperature as well as the phase of the matter (liquid, solid, gas) but that's a topic for another time).
The volume of a cube whose sides are s in length will be s3
Now to complete the calculation, keep in mind that the sides are given in terms of cm, whereas the density is given in terms of kg/m3., so one can either the side length to meters (12 cm = 0.12 m) OR the density to kg/cm3.
Either way the solution will (or should) be 1.7 kg. (adhering to significant figures)