The two richest persons in the world – Bill Gates and Warren Buffett – last week told business students at ColumbiaUniversity that the worst of the recent recession is past. Both remain optimistic about the U.S. economy and the capitalist system, but agree that federal intervention was essential to preventing a further economic collapse.

“I would say, overall, the officials in Washington did a terrific job of dealing with really what was an economic Pearl Harbor, Buffett said during the discussion, which was broadcast by CNBC. “Last September, only the government could have saved things. The whole world wanted to deleverage. …And the only entity that could possibly leverage up at the same time that everybody else wanted to deleverage was the federal government. And when 200 billion [dollars] flowed out of money market funds in a couple of days, when commercial paper stopped, only the federal government could act then. And fortunately we had the people there who recognized that and acted promptly.”

Gates noted that the United States has a complex financial system, and that mistakes have been made, then shifted focus to positive aspects such as innovation and the willingness of people to take risk and invest. “This country still has the best universities, the best science, and we’re going to tune our system of capitalism,” Gates said. “The fundamentals of the system, a marketplace-driven system where we invest in education and a great infrastructure for the long-term, that’s continued.”

Gates said he does worry that the American education system, particularly kindergartenthrough 12th grade, is not improving as much as it should. “It's an important system for the economic strength of the country, and since it hasn’t improved that much, that’s a bit scary and needs a lot more attention.”

Buffett noted, “What drives the American system is the quality of opportunity in a market system and the knowledge that when you get out of here, you’re going to enjoy the fruits of the knowledge you have gained. And it will keep working.”

For investors, Buffett advised that “it’s a terrible mistake to look at what’s going on in the economy today and then decide whether to buy or sell stocks based on it. You should decide whether to buy or sell stocks based on how much you’re getting for your money, long-term value you’re getting for your money at any given time. ...And the important thing is to have the right long-term outlook, evaluate the businesses you are buying. And then a terrible market or a terrible economy is your friend. …A period like this gives me a chance to do things. It’s silly to wait. If you wait until you see the robin, spring will be over.”

Acting on that advice, Buffett’s Berkshire Hathaway recently reached an agreement to acquire all remaining shares in the Burlington Northern railway. “The railroads are tied to the future prosperity of this country,” he said. “We start out with the premise… that there will be more people in this country, 10, 20, 30 years from now. They will be moving more and more goods back and forth to each other. And you have the most environmentally friendly and the most cost-efficient way of doing that on the railroads. The Burlington Northern last year on average moved a ton of freight, 470 miles on 1 gallon of diesel. That is far, far more efficient than what takes place over the highways. You have the situation where overall they use one-third less fuel, they put far fewer pollutants into the atmosphere than trucks will. One train will supplant 280 trucks are so on the road. So the rails are in tune with the future,” he explained.

On globalization and the growth of foreign economies, Gates commented, “The U.S. benefits as the globe benefits. You’re not going to have a case where the rest of the world does poorly and the U.S. does well. Our fate is tied to open trade and innovation everywhere. …So it’s good for the world that it’s not as dependent just on the U.S., but the U.S. is where the energy revolution is likely to happen, the IT revolution will continue; we are expected to lead the way.”

And then there was the question of what the two men admire about each other. To that, Buffett said he admired how Gates was using the money he had accumulated to help people worldwide. “In the end, he knows he’s a beneficiary of a terrific society. …He has this view that every human life worldwide is the equivalent of every other human life, and he’s backing it up not only with money, but backing it up with his time.” Through the Bill and Melinda Gates Foundation (to which Buffett has become a contributor), Gates and his wife are spending their money, talent, energy, and imagination to improve the lives of 6.5 billion people around the world.

Gates, in turn, cited Buffett’s integrity and sense of humor, then focused on “his desire to teach things that are complex and put them in a simple form so that people can understand and get the benefit of all his experience, all his models of how the world works. He loves to teach. And he does it meeting with students. He does it in his annual newsletter. He does it when he's talking to me on the phone. It’s a real gift that I admire incredibly.”

And finally, advice from Buffett to executives and managers alike to run your business “like it’s the only business that your family can own for the next 100 years.” Don’t measure how well you’re doing by quarterly earnings, he said. “Measure it by whether the moat around that business, what gives it competitive advantage over time, has widened or narrowed. If you keep doing that for 100 years, it’s going to work out very well.”