First, the problem, as you stated it, does not make sense! An "equation" is not a geometric object and you cannot talk about something being parallel to an "equation"!
I suspect that you mean "Find a unit vector parallel to the graph of the equation 2x-z= 4". Of course, then, the answer cannot be "(2x+4z)/\sqrt{20} because that is an "expression", not a vector. Perhaps you mean (2\vec{i}+ 4\vec{k})/\sqrt{20}.
Further, if we are to interpret this in 3 dimensions (implied by using x and z rather than x and y), then the set of points satisfying 2x- z= 4 is a plane and there are and infinite number of vectors parallel to that plane.
If, instead, you mean a unit vector, in the xz-plane, parallel to the line given by 2x- z= 4, a simple way to do this is to note that if x= 0, z= -4 and if z= 0, x= 2. That is, the line goes through (0, -4) and (2, 0). A vector from (0, -4) to (2, 0) is 2\vec{i}+ 4\vec{k}. That vector has length \sqrt{2^2+ 4^2}= \sqrt{20}. A unit vector pointing in the same direction as that line (in the xz-plane) is
(2\vec{i}+ 4\vec{k})/\sqrt{20}[/itex]