What is the NOTICE statute?
("A conveyance of an interest in land shall not be valid against anny subsequent purchaser for value, without notice thereof, unless the conveyance is recorded.")
THE LAST BFP TO ENTER WINS.
If, at the time B takes, he is a BONA FIDE PURCHASER, he wins. It does not matter that A may ultimately record first, before B does.