Correct, TS: administer in order.
This can often be crucial to get right. If B fouls first, you walk off their 15. If the line to gain is reached, A will receive a new series after enforcement of their DB PF, 1/10 from there.
It can also be crucial if you start inside either 30 yard line, as one of the fouls might be half the distance, depending on the order. For instance, if the ball is dead on the A20, and A fouls before B, then you'll next put the ball in play at the A25 (enforce the penalty for A's foul half the distance, then back out 15 for the penalty on B). But if B fouls before A, then you'll next put the ball in play at the A20 (enforce both penalties 15 yards).