Local Histogram Processing clarification
If you move the 3x3 window to the right by 1 pixel, a new column gets introduced to the right of the previous window and the leftmost column gets deleted. 

If the histogram component for the k$^{th}$ intensity level is $p_{k}=n_k/n$ where n is the total number of pixels in the neighborhood and $n_k$ is the number of pixels with intensity k.

For new window, $p'_{k} = (n_k+n_{r_k}-n_{l_k})/n$
where $n_{r_k}$ is number of occurrence of the $k^{th}$ intensity level pixels in the added right column and $n_{l_k}$ is number of occurrence of the $k^{th}$ intensity level pixels in the deleted left column.

$$p'_{k} = n_k/n+(n_{r_k}-n_{l_k})/n$$
       $$p'_{k} = p_k+(n_{r_k}-n_{l_k})/n$$