The transaction B must pay 1000 satoshi more for its own bandwidth and since the transaction A paid 500 satoshi, it should pay at least 1500 satoshi in total.
So, as mentioend above by BlackHatCoiner, the fee rate for the replacement transaction must be at least 1500/1000 = 1.5 sat/vbyte.
Wow, completely forgot about A.
Nevertheless that is not a rule punctually kept. Miners may accept and include into block transaction with the feerate literally equal to zero. They do it sometimes when this involves either their own transactions (RBF included) or payment receiving (
in cash for instance) outside the blockchain.