Cognitive and metacognitive activity in mathematical problem solving: prefrontal and parietal patterns