You stated the face mask foul occurred at the end of the run. I assume you meant the foul occurred while the ball was live.
If the face mask occurred after the runner was down or forward progress ended, the call would have been correct. Dead ball, personal foul, face mask, the line to gain was reached, 15 yards from spot, A's ball 1st and ten from the B45 yard line.
P.S. A committing a face mask foul is a rare occurrence