Solving algebraic equations via Buchberger's algorithm