President Carter preached the virtues of unity today on a quick trip into the home territory of his now-official political rival, Sen. Edward M. Kennedy (D-Mass.).

On the day that Kennedy formally established a campaign committee to challenge Carter for the Democratic presidential nomination, the president addressed a "summit on energy" here sponsored by the seven-member Coalition of Northeastern Governors.

He delivered his standard message on energy, calling for a strengthening of the "windfall profits" tax bill approved by the Senate Finance Committee and calling on the country to unite to overcome its energy problems.

"It is too late to try to find scapegoats, to try to affix blame for delays," the president said of efforts to enact a national energy policy. "Now is the time for us to work together, to recognize that we have a common problem, a common challenge, that we face common questions."

Carter added that the country must not be divided, confused or "dream of the restoration of past times when oil was plentiful and cheap. It will never come back."

Speaking later at a reception sponsored by the northeastern governors, the president returned to the theme of unity.

"One of the most debilitating things in a time like this is for there to be an attempt made politically to benefit because our nation is being challenged," he said. "It is not a time to grasp for selfish advantage. It is a time for us to put aside differences, except in open debate that is part of democracy, and work toward the future."

Kennedy is widely believed to lead Carter in New England and much of the Northeast. Nevertheless, a large crown turned out to see the president at the airport, and Rhode Island Gov. J. Joseph Garrahy praised Carter effusively as a friend of the Northeast.

The president also has been endorsed by some of the governors who attended the energy meeting, including Ella T. Grasso of Connecticut and Brendan T. Bryne of New Jersey.

But another Democratic governor who is supporting Carter publicly, Edward J. King of Massachusetts, seemed to suggest in an offhand comment today that his support hinges largely on his state's need for federal aid. A reporter heard King remark to an aide that "he's the president for the next 15 months and he could really hurt us."

In his speech at the energy meeting, Carter repeated his frequent criticism of the windfall profits tax bill approved by the Senate Finance Committee. He said that over the next 10 years this version of the legislation "would give back to the oil companies in unearned profits $374 billion," and that if inflation and world oil prices exceed projections it could become "a $1 trillion giveaway to the oil companies."

White House officials later issued a clarification, saying that Carter's $1 trillion figure referred to the oil companies' estimated gross revenues, before payment of federal and state taxes.

The president also told his audience, many of whom are concerned about the availability and soaring price of home heating oil, that the sacrifice needed to overcome the energy shortage could be good for the country. s

"It will not even be an inconvenience," he said. "It will certainly not weaken our family structures, our community, our state or our nation. It can be an exciting and productive and positive action.It can bring families together in a closer unity. It can strengthen communities . . . It is a patriotic gesture. It can be pleasant, not an unpleasant sacrifice."

Carter returned to Washington later today accompanied by three members of Rhode Island's four-member congressional delegation. The one exclusion was Democratic Rep. Edward P. Beard, a Kennedy supporter.

Back in Washington, Carter told a bipartisan group of about 100 House members at a White House dinner that the Senate Finance Committee had "decimated" his tax proposal, and he urged them to join him in fighting for a stronger tax.

According to some of those present, the president also announced he would sign the standby gasoline rationing bill Congress passed last week, although he complained that it didn't give him enough flexibility.

Carter reportedly said he didn't like the bill's requirement for a 20 percent gasoline shortage before rationing could be considered.

He also announced his support for the stronger of two versions of his proposed Energy Mobolization Board headed for House floor debate today. The board is intended to oversee major energy projects and cut through government red tape.