if the shot was released before the foul occurred, the basket counts. then after you came to a realization that the 2 points should have counted, the points can be corrected at any time of the game, and that time of correction ends when your jurisdiction ends when you leave the visual confines of the court. all it is a scoring error, which can be corrected at anytime, if im not mistaken.