1st of all Why wasn't Team B trying to foul?
I would expect being down in the 4th qtr with only 10 sec left that they would be trying to foul. Now to answer your question, I would blow play dead at the point when I heard the whistle (and reset the clock to the time that I heard the whistle). You would then give Team A the ball for a throw in at the POI, and resume play, expecting Team B to foul. Common Sense shold be used here!