x=-2
y=2
Explanation
[tex]\begin{gathered} -x+y=4\text{ Equation(1)} \\ x+3y=4\text{ Equation(2)} \end{gathered}[/tex]
Step 1
isolate y in equation (1) and replace in equation (2)
[tex]\begin{gathered} -x+y=4\text{ Equation(1)} \\ \text{add x in both sides} \\ -x+y+x=4+x \\ y=4+x\Rightarrow Equation(3) \end{gathered}[/tex]now, replace equation (3) in equation(2)
[tex]\begin{gathered} x+3y=4\text{ Equation(2)} \\ x+3(4+x)=4\text{ } \\ x+12+3x=4 \\ 12+4x=4 \\ \text{subtract 12 in both sides} \\ 12+4x-12=4-12 \\ 4x=-8 \\ \text{divide both sides by 4} \\ \frac{4x}{4}=-\frac{8}{4} \\ x=-2 \end{gathered}[/tex]Step 2
now replace the x value in equation (3) to find y
[tex]\begin{gathered} y=4+x\Rightarrow Equation(3) \\ y=4+(-2) \\ y=4-2 \\ y=2 \end{gathered}[/tex]I hope this helps you