An increase in spending does not cause inflation. In fact your composition is misleading.
Inflation is simply a change in the price level.
The CPI is a market basket of goods and services that represent the majority of consumer purchases during the year. An external shock such as the Oil Embargo of the 1970s is an example. Another is our experience during WWII when large black markets were created by wartime price controls. The official price level was one thing but prices paid by individuals exchanging goods on the black market steadily increased during the war years. The black market actually benefited the US after the war as it eased inflationary pressures as pent up consumer demand exploded.