in some way, yes..
if you meant that your domain A is spammy
spammy links -> 301 -> new domain = spammy new domain
because backlinks that are spammy are redirected to new domain..
but google nowadays disregard spammy links.. so a little percentage goes to your new domain
and, another thing is niche, is your domain A same niche with your domain B?
if no, there is no point in redirecting domain A to domain B, rather redirect your 301 to a certain page or certain post