**Hint:** Let $\mathbf u=(u_x,u_y,u_z)$ be a unit direction vector for the line, so that $\|\mathbf u\|=\sqrt{\mathbf u\cdot\mathbf u}=\sqrt{u_x^2+u_y^2+u_z^2}=1$. You have $\mathbf u\cdot\mathbf e_x=u_x=\cos{45°}$ and $\mathbf u\cdot\mathbf e_y=u_y=\cos{120°}$. Solve for $u_z$, which will also be the cosine of the inclination from the $z$-axis $\mathbf u\cdot\mathbf e_z$.