But, as B fouled, assuming the penalty doesn't result in a new series, unless A decline, A will be repeating the down. (Are there any B fouls in NFHS where this doesn't happen? Honest question - I'm not that familiar with NFHS rules.)
Therefore, if A accept, A will not be shortchanged on the play clock, they will actually get an additional play clock over and above what they would have had if B had not fouled because they get the play clock for the repeated down in addition to the play clock they would have got anyway with no foul:
2nd down (no foul) -> 40s play clock -> 3rd down
2nd down (B foul) -> 40s play clock -> 2nd down again -> 40s play clock -> 3rd down