How do miners determine if a wallet has sufficient funds
The blockchain does not see wallets at all.  It only sees spent and unspent transaction outputs (txouts).  A txout is either completely spent or completely unspent - it cannot be "partially" spent and so there is no notion of balance.  (If you want to spend less than the full value of a transaction, you create a change output.)

In your example, there are now two txouts that B can spend.  The "private key" B would actually be a master private key - each "derived" key is really a keypair consisting of a private key B.1.priv and a public key B.1.pub.  So in order to spend the txout that was paid to B.1, user B must sign a transaction using the private key B.1.priv.  If B wants to spend the entire 1 BTC, she can create a transaction with two inputs and signed by both B.1.priv and B.2.priv.

It is true that nobody except B (and maybe A) knows that both txouts are spendable by the same person.  That is fine - they don't need to know.  This is considered a desirable privacy feature.

If B should lose B.1.pub, no problem - it can be regenerated from B.1.priv. This is part of how ECDSA works.   If she should lose B.1.priv, it can be regenerated from the master private key B.  If she loses the master private key, she is out of luck and cannot spend her coins.