President Reagan and House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.) flailed at each other in a new war of words yesterday, with O'Neill calling Reagan's program "cruel to the poor" and accusing the president of bending the truth in an effort to "hoodwink the Middle American people."

Reagan's spokesman shot back that O'Neill and House Majority Leader James C. Wright Jr. (D-Tex.) were off on a "flight of partisan fantasy," while Reagan later in the day dismissed the flare-up as simply a reflection of the two-party system.

"Obviously there are differences between the two parties or there wouldn't be two parties on domestic issues," Reagan said of his intensifying disputes with the Democrats over taxes, defense and domestic spending.

O'Neill began the day by saying on NBC's "Today" show that Reagan's policies have been "cruel to the poor of America," and said the president has tried to "hoodwink the Middle American people, the blue-collar workers."

O'Neill's comments followed the remark by Wright earlier in the week that Reagan's excuses about the high deficits in his budget and continued high unemployment make him "the biggest alibi artist ever to serve in the White House."

The White House quickly returned the fire.

Deputy White House press secretary Larry Speakes told reporters, "I don't know what's got into Wright and Tip. Tip was something else this morning on the news. More and more those guys are taking to flights of partisan fantasy lately. I don't know whether it has to do with age or with the fact we've got an election coming up."

The speaker is 70 and Wright is 61. Reagan is 72.

After O'Neill's television appearance he went to the House chamber, where Rep. Robert S. Walker (R-Pa.) called him and his fellow Democrats "liberal cronies."

"Cruelty," said Walker, speaking loudly and gesturing with a pointed finger, "is the failure of the liberal version of the American dream. President Reagan's efforts to restore the real American dream of growth and work are our hope for the future."

O'Neill, who was in his usual seat on the speaker's dais, made a rare appearance in the well to respond.

"I want to reiterate what I said," O'Neill said. "I believe it's cruel, the program of the president of the United States . . . . If you earn less than $20,000 a year there's a net loss to you of approximately $20 billion by the programs that have been cut and things of that nature . . . . The promise of full employment? A promise of 13 million jobs? Thirteen million unemployed out there. A promise of balanced budgets in 1984? Highest deficits in the history of this country."

O'Neill, red-faced as he spoke, was angered earlier in the week, according to his aides, by reporters' "softball questioning" of the president at a Tuesday night news conference, as well as by the president's attack on Congress Monday before a convention of home builders for "irresponsible spending."

Christoper Matthews, an O'Neill aide, said O'Neill feels that Reagan has been able to get away with not taking the blame for "tying up" the budget for the last two months although he has insisted on more defense spending and further cuts in domestic programs, and has refused to be flexible on his tax cuts program even though the country is in a recession.

According to Matthews, O'Neill's frustration prompted him to say on television that the president often "distorts the facts."

"I said this morning the president sweet-songs Middle America and the blue -collar person," said O'Neill in Congress. "I don't like the way that it's done . . . ."

On the television show O'Neill disparaged Reagan's attempts at bipartisanship as a political maneuver dictated by the president's low standing in the polls before last November's congressional elections.

"Since two months before the elections of last year it has been compromise government for everything that's going on," he said. "Now . . . he's rising in the polls. The polls say conditions are turning around out there and suddenly . . . he resorts to his old system of blaming" Congress.

At the White House, after the president met with a group of Republican and Democratic congressional leaders seeking bipartisan support for the MX and his policy in Central America, the congressmen told reporters that Wright lectured Reagan about the damage he has done to bipartisanship with his attacks on Congress for its budget proposals.

"You can't have it both ways," Wright said he told the president. "We in Congress can't be expected to be supporters one day" on foreign policy and the MX "and whipping boys the next" on the budget.

In an afternoon interview with United Press International reporter Helen Thomas, Reagan reportedly was not upset by the barbed exchanges, but did say that he felt Wright had escalated the war of words.