rule = u[lft___,x,y,rgt___] :> u[lft,y,x,rgt]+u[lft,x,rgt]

u[x,x,x,x,x,y,y,y,y] //. rule // Expand