I started this mostly as an exercise to review related clock rules. But the discussion reveals some misunderstandings that I will address, now.
The results in the ultimate rulings provided are correct. However, the reasoning in some of the discussion is incorrect.
In the original scenario, the fouls neither offset nor do the distance penalties cancel. This is a case of a live ball-foul followed by a dead-ball foul (10-1-6). As such, the penalties for both fouls are completed separately and independently of the other. Although I can't imagine why a team would so elect, it is entirely possible for either (or both) teams to decline the penalty for their opponent's foul. So, the R should just consider the choice to accept the penalty for each team to be obvious, and proceed with penalty enforcement. BOTH penalties, technically, get stepped off. Of course, unless 1/2 the distance gets involved, if both penalty distances are the same, the ball ends up in the same spot as the first enforcement spot, as in the original scenario. However, as in the second scenario, the first penalty is enforced 1/2 the distance to the goal, then the second penalty is enforced the full 15 yards, so the ball ends up 5 yards behind the first enforcement spot. In the case of a 5-yard penalty followed by a 15-yard penalty (like an illegal formation foul followed by a dead-ball late hit out of bounds), the ball will end up 10 yards away from the original enforcement spot.
The second element in these situations is the down number. If one of the penalties includes a first down, then the next down will start a new series with first down. However, it is entirely possible for the previous down to be repeated (live-ball Team B DOF that does not leave the ball beyond the LTG, followed by a dead-ball UNR/UNS by Team A). Both distance penalties get enforced, then the down is repeated.
The third element is the clock. In the scenarios provided, there is a change of team possession during the down, but Team A retains the ball after the penalties are enforced. Since Team B will NOT next snap the ball, and there is NO OTHER REASON THAT WOULD HAVE STOPPED THE CLOCK, the game clock will start on the referee's signal. The play clock is 25-seconds, and also starts on the referee's signal.
Good things to review and discuss.