Let $y=mx+c$ be the line through the point A(-1, 2)

$ \therefore 2 = m(-1)+c$

$ \Rightarrow 2 = -m+c$

or $c=m+2$

Hence $y=mx+m+2$------(1)

Equation of the given line is

$x+y=4$------(2)

Let us solve equation (1) and (2) for $x$ and $y$.

$ x + mx+m+2=4$

$ \Rightarrow x(1+m)=2-m$

$ \therefore x = \large\frac{2-m}{1+m}$

also $ y = \large\frac{5m+2}{1+m}$

Hence $B \bigg( \large\frac{2-m}{1+m}$$, \large\frac{5m+2}{1+m} \bigg)$ is the point of intersection.

It is given that the distance between the two points A and B is 3 units.

$ \therefore \overline{AB} = \sqrt{ \bigg( \large\frac{2-m}{1+m}+1 \bigg)^2 + \bigg( \large\frac{5m+2}{1+m}-2 \bigg)^2}$

$ \Rightarrow 3 = \sqrt{ \bigg[ \large\frac{2-m+1+m}{1+m} \bigg]^2+ \bigg[ \large\frac{5m+2-2-2m}{1+m} \bigg]^2}$

Squaring on both sides we get,

$9= \large\frac{9}{(1+m)^2}$$ + \large\frac{9m^2}{(1+m)^2}$

$ \Rightarrow 1 = \large\frac{1}{(1+m)^2}$$+ \large\frac{m^2}{(1+m)^2}$

$ \Rightarrow (1+m)^2= 1+m^2$

i.e., $1+2m+m^2=1+m^2$

$ \Rightarrow m = 0$

Hence the slope of the required line is 0.

$ \therefore $ The line must be parallel to $x$ - axis.