That relation isn't even in 2NF
My book says that the above relation is in 4NF
Why do you say that? What is your book? That relation value has sole CK {B} but satisfies the FD {} -> A which is a partial dependency of a non-prime attribute on a CK so it isn't even in 2NF.
Your implication is wrong
for a relation to be in 4NF, A should be a super key for that relation if there is a MVD of form A->->B
Let us simplify that complicated phrasing: if a relation is in 4NF then if MVD (multi-valued dependency) {A} ->> {B} holds then {A} is a superkey.
From Wikipedia:
A table is in 4NF if and only if, for every one of its non-trivial multivalued dependencies X ↠ Y, X is a superkey
This tells us that if a relation is in 4NF then if non-trivial MVD X ->> Y holds then X is a superkey.
So it doesn't tell us what you claimed. You left out "non-trivial".
But since the relation isn't in 4NF the inner implication doesn't matter.
That MVD is trivial so if we had 4NF then the inner implication wouldn't apply
In your relation {A} ->> {B} holds, but it is trivial since {A} U {B} is the set of all attributes and
A trivial multivalued dependency X ↠ Y is one where either Y is a subset of X, or X and Y together form the whole set of attributes of the relation
So if the relation were in 4NF then {A} would not have to be a superkey.
(The (trivial) (binary) JD (join dependency) corresponding to the MVD is *{{A}, {A, B}}, ie the relation is the join of its projections on {A} & {A, B}.)
Other MVDs hold that violate 4NF
The definition tells us that a relation being in 4NF requires that if a non-trivial MVD X ->> Y holds then X is a superkey.
If you list all the MVDs relevant to that relation then you will find that they are all trivial except {} ->> {A} and {} ->> {B}. It happens that both of those hold. (They express the same condition, that the same JD holds, that the relation is a certain join.) But {} isn't a superkey. So 4NF is violated.
(In terms of JDs: The only possible non-trivial binary JD is *{{A}, {B}}, which happens to hold. But that is not implied by the CKs, ie it doesn't have to hold when the CK set is {{B}}, ie (per Fagin's membership algorithm) the join of its two elements is not on a common column set that includes a CK of both. So the relation is not in 4NF.)
But we already know 4NF is violated, because we know 2NF is violated.