Solving systems of equations with elimination