According to Archimedes’ principle, when a body is immersed wholly or partially in a liquid, it experiences an upward buoyant force of magnitude equal to the weight of the liquid displaced by it.
So , Weight of the fluid displaced = buoyant force
= Wa–Ww=W
=Weight of the body in air,Wa= 10 N
= Weight of the body in water,WW= 8 N
W = 10-8 = 2 N