The arrow gets flipped when either the throw-in completes or there is a violation. (Case 6.3.5A and succeeding Comment) 
 
So in the first two instances, Team A retains the arrow.  In the last play, Team B gets the arrow and the ball because Team A violated.
		 
		
		
		
		
		
		
		
		
	
	 |