Your reasoning is correct and the solution as written is wrong. The $-n^2$ summand is a lower-order term, though, and it is going to have only a very small impact for a matrix multiplication of order $n=1000$, so the estimation that you are asked to perform will be almost correct nevertheless.
The exercise is sloppily phrased and there are multiple issues with it; for instance:
1. Additional operations are needed in practice on a computer, for instance integer index bookkeeping.
2. As Pavel pointed out, the most natural implementation for a programmer is not the implementation with the minimum number of flops.
3. There are faster algorithms for multiplying matrices than the naive $O(n^3)$ method, although you are presumably not supposed to know this.
I personally would have avoided giving an exercise like this. It is very confusing.