It is important to indicate the context of this question. Mathematics class or economics class.
While mathematically are the same, there is an important difference between both of them:
Prices do not stay constant, they are always rising and declining due to the law of supply and demand.
An increase in the money supply - inflation, properly defined - has a tendency to raise them in general (that is, inflation is an ongoing rise in the general level of prices).
See the following site for more info:
https://wiki.mises.org/wiki/Inflation