Notice that because the vector $\mathbf{u} = e_2$ is equal to one of the basis vectors this reduces quite nicely. The directional derivative $D_\mathbf{u}$ becomes just $\frac{\partial}{\partial x_2}$ giving
$$\frac{\partial f}{\partial x_2} = x_2 + a_2$$
because any terms involving $x_{i\neq2}$ disappear with the differentiation.
Notice that because the vector $\mathbf{u} = e_2$ is equal to one of the basis vectors this reduces quite nicely. The directional derivative $D_\mathbf{u}$ becomes just $\frac{\partial}{\partial x_2}$ giving
$$\frac{\partial f}{\partial x_2} = x_2 + a_2$$
because any terms involving $x_{i\neq2}$ disappear with the differentiation.