solving systems of three equations with elimination