Boeing and Lockheed Martin got a billion dollars (together, so half a billion each) from the Air Force to develop Delta IV and Atlas V.
Then ULA got monopolist prices ($400 million for a Delta IV Heavy launch!) for years and a sweet billion dollars per year for maintaining the capability even if no launches happen that year.
Falcon 1 was developed using private money.
Falcon 9 and Dragon 1 were developed using 396 million of government money from NASA COTS program, and about a billion dollars of private money (for upgrades and reusability).
Falcon Heavy was developed using half a billion of private money.