Sine the density of the body A is lesser than that of the liquid , the net force experienced by the body is UPWARDS.
since the density of the body B is greater than that of the liquid , the net force experienced by the body is DOWNWARDS.
LET THE VOLUME OF THE BODIES A OR B BE V
DENSITIES BE Pa , Pb ,Pl.
let force F experienced by the body A IS GIVEN BY
F = Pl Vg - Pa Vg = [Pl -Pa]Vg
since Pl is greater than Pa so F IS POSITIVE AND ACTS UPWARDS
SIMILARLY IN CASE OB BODY B
F = [Pl - Pb]Vg
since Pl is less than Pb , F IS NEGATIVE AND ACTS DOWNWARDS