Pitcher A takes the loss because her team was behind when she was replaced and her team never tied or took a lead afterward. It doesn't matter that the team eventually scored as many runs as she gave up.
ASA Rule 11 Section 6. A PITCHER WILL BE CREDITED WITH A LOSS. Regardless of the number of innings the pitcher has pitched, a pitcher shall be charged with a loss if replaced when the pitcher's team is behind in the score and fails to tie the score or gain the lead thereafter.The ATEC Scoring Guide (
http://nfca.org.ismmedia.com/ISM2/Multi ... r/ATEC.pdf) provides more info regarding pitching changes in the middle of an inning.
8. The starting pitcher receives a loss if she is relieved while her team is behind
and her team remains behind, regardless of the number of innings pitched.
9. A relief pitcher is the losing pitcher if she is the pitcher of record when the
opponents go ahead and stay ahead the rest of the game, NOTE: When
determining the score of the game when a pitcher is replaced, include runs for
which the replaced pitcher is charged even if they have not yet scored.You don't take the score when a pitcher is replaced in the middle of an inning with a lead or tied game if they are leaving runners on base - you have to wait and see whether those runners score or not. Example: Pitcher A is replaced in the middle of an inning with a 2-1 lead and leaving 2 runners on base. If 1 runner scores, the pitcher will not be credited with a win or a loss. If both runners score, the pitcher is on the hook for the loss unless her team subsequently ties the game or takes the lead.