how to solve algebraic problems