how to solve an equation with parenthesis