Only way B can win is if A didnt show for the all in preflop, then threw (this is how you spell it, not through) his cards into the muck before the river. Once hands are shown it is the dealers responsibility to award the pot to the winning player.