You're going to have to drop the replication and re-establish it after the database is moved to the new server. Don't forget about the distribution database.
In your message you state that you're going to rename ServerB to ServerA, do you know all the steps to do this?
-Mike