Think about an object floating in a water. There are two forces acting on the object in this case which are upthrust of water and weight of the object. These two forces must be equal so that the object can float in the water.

We already saw the formula for weight.

For buoyancy force the formula is;

$latex F_{buoyant} = \rho_{f} g V_{df}$

Where $latex \rho_f $ is the density of the fluid

g is the gravity

And $latex V_{df}$ is the displaced fluid volume (in other words volume of the part of the object that is in the fluid)

So if you make them equal to each other;

$latex F_bouyant = Weight$

》 $latex \rho_f g V_{df} = \rho_{obj} V_{obj} g$

If we divide both side of the equation with g;

$latex \rho_f V_{df} = \rho_{obj} V_{obj}$