How can the player shooting the wrong group even get a second shot at the wrong group? His very first shot was a foul, isnt he supposed to told he committed a foul before he clears the table?
Not according to APA rules:
g. Occasionally it occurs after the break, or anytime during the game for that
matter, that a player mistakenly starts shooting the wrong category of
balls. Although it is sportsmanlike for the sitting player to remind the
shooting player that he is about to foul by shooting the wrong category of
balls, it is not a requirement for him to do so. Once the shooter has hit
the wrong category of balls, the foul has occurred whether the ball is
pocketed or not. If the ball is pocketed, it is permissible, though not
recommended, that the sitting player allow the shooting player to continue
shooting his balls in until he feels inclined to call the foul. The shooting
player can escape penalty by quietly realizing his error and returning to shoot the correct category of balls and legally contacting one of them
before his opponent calls a foul, or by finishing off the wrong category of
balls and legally contacting the 8-ball prior to his opponent calling a foul.
In other words, the sitting player must call the foul before the shooter
returns to the correct category and legally contacts one, or before the
shooter pockets the remaining balls of the wrong category and legally
contacts the 8-ball. Once a player makes legal contact with the 8-ball,
the player assumes control of that category of wrongly pocketed balls
and can win the game by legally pocketing the 8-ball. In addition, if the
sitting player does not call a foul before his opponent’s turn ends, and
subsequently contacts the wrong category himself, both players will assume
the new category of balls for the remainder of the game. Before any foul
has occurred, the shooter also may avoid penalty by asking the sitting player
which category of balls he has. The sitting player must tell him the truth.