to solve the equation for z
start by substracting x on both sides in order to eliminate x on the left of the equation
[tex]\begin{gathered} x-y+z-x=5-x \\ -y+z=5-x \end{gathered}[/tex]continue by adding y on both sides in order to eliminate y on the left of the equation
[tex]\begin{gathered} -y+z+y=5-x+y \\ z=5-x+y \end{gathered}[/tex]