Getting the $\mathcal Z$-transform of the moving average summation
You can use the linearity property of the $\mathcal Z$-transform:

$$a_1x_1[n] + a_2x_2[n] \overset{z}\longleftrightarrow a_1X_1(z) + a_2X_2(z)$$

together with the time shifting property:

$$x[n-k] \overset{z}\longleftrightarrow z^{-k}X(z)$$

Expand the summation like below and apply the two properties.

$$\sum_{k=0}^M b_k  x[n-k]=b_0x[n]+b_1x[n-1]+\ldots+b_Mx[n-M]$$