If you go out of bounds without reason (not trying to save a ball, getting pushed out, momentum from a drive, etc), you can’t be first to touch once you re-establish. In college, the rules allow play to continue unless you’re first to touch. In high school, it’s an immediate whistle. This play should have been killed before the shot.
The problem here lies with the official on the baseline. The sideline official has 2 responsibilities - the chance of a foul on the ballhandler and the possibility of the ballhandler stepping out of bounds. That official ended up too close to the play and missed the ballhandler stepping on the line, which would have nullified the pass. The baseline official was on that side of the floor and in an end-of-game situation like that, needs to be on the ball rather than his normal primary area. He also has to recognize the player stepping out and be aware of the rule in the moment to make the call. It’s a bit of an obscure rule that usually only comes up along the baseline and often when an offensive player is using screens. Also, this part of the play couldn’t be reviewed because there was no whistle on it. Only review was did the shot get off in time. That’s college. Had this been NBA, they’d have gotten it right (look up Luka Doncic halftime review from a week or two ago).
Hope that explains it well. Bad break for Rutgers.