Since these are remote branches (and assuming that you are not working in isolation), it is a very bad idea to rebase one onto the other.
This is because rebasing "B" onto "A" will recreate the entire history of "B". Anybody else who will retrieve the remote "B" will now have to deal with that (usually that means they are seeing conflicting changes). You will be making live miserable for your collaborators.
To pick up the changes from "A" and incorporate them into "B", checkout your local version of "B", and merge "A" into it. Then push the updated "B" to the remote repository.
As a general rule: do not rebase branches that are already in a remote repository, unless you're the only person working with that remote.