We know that an object will sink if its apparent weight is 0.
Now, true weight of the body = 40N
apparent weight of the body = 30 N
So, the buoyant force on the body = 40N-30N=10N
now, as the apparent weight is still downwards, the object wouldn't be able to keep floating and would sink under its own weight.