This can be tricky: you can both write
In the first case you obtain , as you did, whereas in the second case you
get , so what's the correct one?
In my opinion, they both are, and this perhaps is the reason why the usually ask what the
coefficient of some power of x is, not what is this or that term.