An object floats on water if its density is less than that of water.
But, here rubber has more density than that of water.
Since, the rubber duck and fish are hollow from inside, the overall density becomes less as density of air is less than that of water.
Also, The object will float if the upthrust is equal to the weight of water the object pushes away. The object will sink if the upthrust is smaller than its weight.
The rubber duck and fish floats because the weight of the water it pushes away is equal to the upthrust.
That's why, a rubber duck and fish floats on water.