Good situation. I see 5 possibilities...and the way you described it and administered it doesn't match any of them. You called it as if it were #4 but you described it as it were #1 or #2, or perhaps #3.
All start with a T for unsportsmanlike conduct on A1.
1. If the two shoves were approximately the same time and all action occurred before the try ended:
- The shove by B1 was a personal foul.
- The shove back by A1 was also a personal foul.
- Same time makes it a double foul.
- Penalized the T....2 shots and the ball for B.
2. If the two shoves were NOT approximately the same time (B1 shoves then A1 gets back up and shoves back) and all action occurred before the try ended :
- The shove by B1 was a personal foul.
- The shove back by A1 was also a personal foul
- Not the same time makes it a false double foul.
- Penalize all fouls in the order of occurance. T, personal, personal.
3. If the two shoves were NOT approximately the same time (B1 shoves then A1 gets back up and shoves back) and all the last shove only was after the try ended:
- The shove by B1 was a personal foul.
- The shove back by A1 was a technical foul
- Penalize all fouls in the order of occurance. T, personal, T.
4. If the two shoves were approximately the same time and both were after the try ended:
- The shove by B1 was a technical foul.
- The shove back by A1 was a technical foul
- Same time makes it a double foul.
- Penalize the first T....2 shots and the ball to B.
5. If the two shoves were NOT approximately the same time (B1 shoves then A1 gets back up and shoves back) and both were after the try ended:
- The shove by B1 was a technical foul.
- The shove back by A1 was a technical foul
- Not the same time makes it a false double foul.
- Penalize all fouls in the order of occurance. T, T, T.
The basket would count in any case.
A1 may or may not be DQ'd depending on which scenario really happened.
Whether the fouls were close enough in time to be considered "approximately" the same time is your judgment.
You could declare actions a fight making both actions flagrant and DQ both of them in any case.