Solving systems of equations using elimination method