Balance factor changes after local rotations in AVL tree
I found the answer myself.
We know that
$$b(x)=b(x')+b(y)[b(y)&gt;0]+1$$
$$b(y′)=b(x)+b(y)[b(y)\le0]−b(x′)[b(x′)&gt;0]−2$$
thus
$$b(y′)=b(x')+b(y)[b(y)&gt;0]+1+b(y)[b(y)\le0]−b(x′)[b(x′)&gt;0]−2$$
where
$$b(x')−b(x′)[b(x′)&gt;0]=b(x')[b(x')\le0].$$
So, the new balance factors will look like this:
$$b(y′)=b(y)+b(x')[b(x')\le0]−1$$
$$b(x′)=b(x)−b(y)[b(y)&gt;0]−1$$