It is the government spending that causes inflation not the people spending which boosts the economy.
Supply and demand determine prices in the free market.
So if supply remains the same, but demand goes up, (because people have more money) that drives up prices which is inflation.
Which is why the fed raises interest rates when inflation is too high, it takes money out of the economy which deduces demand which drives down prices.