solve the system of equations using the substitution method. show all work

We have the system of equations:
[tex]\begin{gathered} 4x-y=7 \\ 5x-8y=2 \end{gathered}[/tex]As we will solve it by substitution, the easiest way is to clear y from the first equation:
[tex]\begin{gathered} 4x-y=7 \\ 4x-7=y \\ y=4x-7 \end{gathered}[/tex]Then, we replace y in the second equation and solve for x:
[tex]\begin{gathered} 5x-8y=2 \\ 5x-8(4x-7)=2 \\ 5x-32x+56=2 \\ -27x=2-56 \\ -27x=-54 \\ x=\frac{-54}{-27} \\ x=2 \end{gathered}[/tex]Now, we solve for y as:
[tex]y=4x-7=4\cdot2-7=8-7=1[/tex]Answer: x=2 and y=1.