tony and Brian are both correct, but in case it's not entirely clear, the violation is for causing the ball to enter the basket from underneath. It's exactly like causing the ball to go OOB. Whoever touches it last is the violator and the other team gets the ball. In your case, B deflected the ball, causing to enter the basket from underneath. So A would be awarded the ball at a designated spot on the endline. The ball returning through the basket on its downward flight is irrelevant as the play is already dead.
Chuck
|