Wallet Y won't receive payment until nLockTime condition passed and transaction included into a block.
AFAIK most peers won't relay nlocktime with 1 month in the future. http://bitcoin.stackexchange.com/a/26983/12049https://bitcoin.stackexchange.com/a/26983/12049
Once transaction gets included into the blockchain, it can't be undone.
So the second transaction spending B is valid, and the first transaction spending A+B is invalid DOUBLE SPEND!