I know this is a trick, but you forgot that a muffed kick can't be advanced, so the TD wouldn't count (not to mention Team B would not punt under any circumstances.) This rule came up in the Giants game last night.
Under this scenario, Team A wins.
Also, the real question is why they didn't lose in the Super Bowl (to a team from the other conference) so it would improve their playoff seeding.
Brushes hands, walks away.