solving an equation by completing the square