"You are treating ab as if they were TWO different integers rather than one. Does it mean the whole answer above is wrong, and that a should have the same power as b in each term?

This is the reply I received when I asked this Question on this forum a few days ago
ab^10-30ab^9+405ab^8-3240ab^7+17010ab^6-61236ab^5+153090ab^4-262440ab^3+295245ab^2-196830ab+59049

This is the answer that I got

and I was explained "You are treating ab as if they were TWO different integers rather than one. Does it mean the whole answer above is wrong, and that a should have the same power as b in each term?

Yes, I interpreted ab to be two different constants, so \(\displaystyle ab^6=a*b^6\) which is wrong.

An easy way to remedy it would just be to place brackets around each ab pair, then you wouldn't have to rewrite it, and it's safer too, because if your instructor is wanting \(\displaystyle ab^6\) (this would seem unlikely) then you won't get it wrong if you write \(\displaystyle (ab)^6\) but you would get it wrong if you wrote \(\displaystyle a^6b^6\). But at the same time, if the instructor is wanting \(\displaystyle a^6b^6\) (most likely) you still won't get it wrong if you write \(\displaystyle (ab)^6\). So be on the safe side, and just put parenthases around these. And make sure you know how to do it if they replace the variables with actual numbers, ie the 6th term of \(\displaystyle (2*3-3)^{10}\)