COBBallRef - welcome to the forum!
For there to be a backcourt violation, remember the basics:
1. - Team A has control in the front court.
2. - Team A is the last to touch ball before it goes in the backcourt.
3. - Team A is the first to touch ball in the backcourt.
Using those basics, in your first scenario, there is no team control on a shot and rebounding tip, so #1 doesn't exist and no violation. In your second scenario, all three points exist, so there is a violation. Team control doesn't end just because player control ends.
Backcourt violation is a topic widely discussed around here. One of our "esteemed members" has a yearly quiz on this subject; you can find the latest version at:
BACKCOURT VIOLATION QUIZ