8m+n=12 m-5n=22 solve using substitution method

well, from the fist equation

n=12-8m

Putting that into the second

12m-5(12-8m)=22
solve for m. Then, put it into the first equation and solve or n