Well, that's actually a very interesting question. Let's add "time expires during the down" to the situation, and add the caveat that the speaking captains both happen to know the rule about when you offer options, the captain's first choice is irrevocable.
How should the R present the options to the captains? We've got four possible combinations here:
Both teams accept the penalties; rekick from A's 30 and extend the period.
Team B declines, Team A accepts; B's ball at their 20, 1st and 10, extend the period.
Team A declines, Team B accepts; Either rekick from A's 25 or B's ball, 1st and 10 at their 35, extend the period.
Both teams decline; The period is over, restart either with B's ball 1st and 10 at their 30, the second-half kickoff, or from the succeeding spot to begin extra periods.
Here's a possible trap. R starts explaining the options. Team A's captain says "yeah, we'll decline the BIB" and runs away. Team B's captain says "OK, we'll accept the offside, then". What do you do now?