Syntax error: expected operator
This is not a math problem its a parsing problem, the answer depends on how you interpret the invalid syntax.
6/2*(1+2) = 9
6/(2*(1+2)) = 1
I favour the second parse but both are equally invalid as the syntax is invalid.