This is overly simplistic. Most economic activity is not related to the government at all. Taxation can slow economic growth and inflation, but the government running at a deficit or surplus is neither a cause or a solution for inflation but rather a byproduct of multiple aspects of government policy.