Solving systems of equations using the method of elimination