You are right. The penalties are not even, even though they are very similar violations. But what would be even? The penalties for A and B violating are largely mutually exclusive, one at the expense of the other. If you ignore the second violation, that's unfair to B. Heck, if that were the case, then if B stepped in early the shooter could simply run forward and dunk the ball. If you only enforce the second penalty, then B gets away with violating. I cannot see a "fair" way to penalize both violations. What we have currently I think is the best of an impossible situation. If B violates they will be penalized, which actually provides A an incentive
not to violate. If they do, well, tough cookies.
:shrug:
Edited to add ---
Perhaps we solve the problem by having a jump ball at the free throw line. That way A loses their free throw, and B is rewarded. But the jump ball nearer to A's basket gives them an advantage not entirely unlike receiving a replacement throw for B's violation. Oh, and one more detail...
BillyMac has to toss the ball for the jump.