This is refutable in ZFC for singular cardinals $\kappa$, since by König's theorem $\kappa<\kappa^{\text{cof}(\kappa)}$.
So for some sets $A$, such as $A=\aleph_\omega$, the set $B$ is definitely larger than $A$.
For other sets, $A$, it can be true. Set theorists would usually write $\kappa^{<\kappa}=\kappa$ for the cardinals $\kappa$ for which it holds, and this is commonly seen as a hypothesis in theorems. If GCH holds, then this is true for every regular cardinal (and false for every singular cardinal).
Let me also point out that Easton's theorem shows it is relatively consistent with ZFC that the GCH fails at every infinite regular cardinal, with $2^\kappa=\kappa^{++}$ for every regular $\kappa$. If we also chop the universe off at the first inaccessible cardinal, if there is one, then we will get a model of ZFC in which $\kappa^{<\kappa}$ is never equal to $\kappa$ for any uncountable cardinal $\kappa$. In such a model, there is not a single instance of $\text{card}(A)=\text{card}(B)$, to use your notation, except the countably infinite case, and the finite cases of size 0 and 1.