Understanding an alternative representation for the difference equation of a FIR filter?
Given that
$$
u[n-k_1] = \sum_{k=k_1}^\infty \delta[n-k]
$$

you can take the difference between two steps with different shifts ($k_1 &lt; k_2$) and obtain:
$$
u[n-k_1] - u[n-k_2]
  = \sum_{k=k_1}^{k_2-1} \delta[n-k]
$$

Then the difference 

$$
3u[n-2] - 3u[n-6]
  = 3\left(\delta[n-2] + \delta[n-3] + \delta[n-4] + \delta[n-5]\right)
$$

which appears in your second equation can be replaced to give:
$$
\begin{align}
  y[n]
    &amp;= 2\delta[n] + 6\delta[n - 1] + 3u[n - 2] - 2\delta[n - 4] + \delta[n - 5] - 3u[n - 6] + 2\delta[n - 7] \\
  &amp;= 2\delta[n] + 6\delta[n - 1] - 2\delta[n - 4] + \delta[n - 5] + 2\delta[n - 7]
     + 3u[n-2]-3u[n-6] \\
  &amp;= 2\delta[n] + 6\delta[n - 1] - 2\delta[n - 4] + \delta[n - 5] + 2\delta[n - 7] + 3\left(\delta[n-2] + \delta[n-3] + \delta[n-4] + \delta[n-5]\right) \\
  &amp;= 2\delta[n] + 6\delta[n - 1] + 3\delta[n-2] +3\delta[n-3]+ \delta[n - 4] + 4\delta[n - 5] + 2\delta[n - 7]
\end{align}
$$

which corresponds to your first expression.