Yes two sets of closing costs would need to be paid. Who pays it is up to you, the seller, and the buyer. I know the big groups like New Western and Net Worth always double close, and always pass the costs on to their buyer.
If your deal is so thin that paying the A to B will eat most of your profits, why not just assign it instead?