<s>[INST] Is there an other way for it? Consider two equations:

$x+y=2$$y+z=4$

Find the value of $(x+z)$.($x,y,z$ all are positive real numbers)
My Approach:
$\because x+y=2 \Longrightarrow y=0$ or $y=1$.
Case 1:
taking $y=0$$ \Longrightarrow$ $x=2$ ; $z=4$.$\therefore x+z = 2+4 = 6.$Case 2:
taking $y=1 \Longrightarrow$
$x=1$ ; $z=3$.
$\therefore x+z = 1+3 = 4.$


$x+z=6$or$x+z=4$

I want to know if my approach is correct or is there more better way to evaluate this ?
 [/INST] Given
$\qquad x+y=2\space\land\space y+z=4\qquad$
we can start by eliminating $y$.
$$
y+z=4\implies z=4-y\\
(x+y=2)\implies x=2-y\\
z-x=(4-y)-(2-y)=2\qquad\longrightarrow (z-x=2)\\
(x+z=4)-(z-x=2)\implies 2x=2\implies x=1\\
(x+z=4)+(z-x=2)\implies 2z=6\implies z=3\\
\therefore\quad x+z=1+3=4
$$
At this point we can also see that $y=1$ but who cares? Ha ha
</s>