Say you have a point $P$ and some line $L$ with direction vector $\vec v$, and you know $P_2$ is on the line. We are interested in the distance from $P$ to $L$. Then we construct a vector going from $P_2$ to $P$, that is $\vec P-\vec P_2$.
The magnitude of cross product $|(\vec P-\vec P_2) \times \vec v|$ gives the area of the parallelogram formed by these two vectors. The distance we are seeking is the height of this parallelogram. The base is of length $|\vec v|$. And $\text{Area}=(\text{base}) (\text{height})$. So the distance is,
$$\text{height}=\frac{\text{Area}}{\text{base}}=\frac{|(\vec P-\vec P_2) \times \vec v|}{|\vec v|}$$

First let $z=0$ then from your two planes we have,
$$x-y=1$$
$$x+3y=4$$
So then $x=1.75$ and $y=0.75$. So one choice of $\vec P_2$ is $\langle 1.75,0.75,0 \rangle$. A direction vector of the line from the intersection of your two planes is the cross product of the normals of the two planes.
$$\vec v=\langle 1,-1,2 \rangle \times \langle 1,3,-1 \rangle=\langle -5,3,4 \rangle$$
So then the distance is,
$$d=\frac{|(\langle 1,2,4 \rangle-\langle 1.75,0.75,0 \rangle) \times \langle -5,3,4 \rangle|}{| \langle -5,3,4 \rangle|}$$
$$d=\frac{|\langle -0.75,1.25,4 \rangle \times \langle -5,3,4 \rangle|}{\sqrt{50}}$$
$$d=\frac{|\langle -7,-17,4 \rangle|}{\sqrt{50}}$$
$$=\sqrt{\frac{354}{50}}$$
$$=\frac{\sqrt{177}}{5}$$