(a) That's wrong. Non-performance (that is to say, a complete failure to perform the contract) justifies terminating the defaulting party's right to perform. Non-performance can occur in different ways. The defaulting party might make no attempt at all to perform, or they may make some attempt at performance but what they do is something different from what was contracted for.
In the present case, it is true to say that A has delivered 50 boxes of fruit to B, but A did not promise to deliver 50 boxes of any fruit. He promised to deliver bananas and he completely failed to do so. This amounts to non-performance of the contract and B would be entitled to reject the oranges that were delivered and stop any further attempt by A to discharge his obligations by delivering bananas. If the breach has caused loss to B, he would also be entitled to claim damages for the breach of contract.