When testing I got a question asking what -3² is, with the intended answer being -9 instead of 9.
−3² = −(3 × 3) = −9 (−3)² = (−3) × (−3) = 9
If there are no parentheses, you first square 3 and then negate the result. But if there are, then you square -3 first as you explained.
I took a look and Mathy correctly accounts for these. But if you're sure your problem had parentheses instead of what you shared, please let me know!
Either way, thank you for the feedback, this was a good thing for me to double check.