In WolframAlpha 6÷2(1+2) gives 9 but 6÷2x with x=(1+2) gives 1.
2x would be expanded as (2 * x), whereas 2(x) expands as 2 * x.
In this case, since the equation is 2(1+2) which results in 2(3), it's final DMAS form is 6 ÷ 2 * 3 = 9, instead of 6 ÷ ( 2 * 3 ) = 1