UAL Inc., the holding company for United Airlines, said yesterday it has agreed to acquire Hertz Corp. from RCA Corp. for $587.5 million in cash, an acquisition that would create a full-service travel industry giant by linking the nation's largest airline and car rental companies.

Since United also owns and manages Westin Hotels, the Hertz acquisition would give the company the opportunity to meet the flying, driving and sleeping needs of its traveling customers. For RCA, the sale of Hertz enables the company to concentrate on its core communications, electronics and broadcasting businesses.

The purchase of Hertz "is a natural extension of our leadership in the airline and hotel industries," said United Chairman Richard J. Ferris. "The great overlap in customers [80 percent of auto rentals are made in connection with an airline trip] will allow United and Hertz to provide uniquely superior service from reservations through check-in to baggage handling. United's strong investment in the travel agency distribution system will serve as an important complement to Hertz's strength in direct contact with corporate accounts."

The purchase would not appear to strain United's resources. At the end of May, the company had about $1.16 billion in cash and last week, United announced that it was recapturing an additional $962 million in excess funds from its pension plans that would be placed in a trust for corporate expansion. The company also is raising between $300 million and $500 million by selling some of its Westin Hotels.

United has been actively playing the acquisition game this year. It has agreed to purchase and then lease back 25 airplanes to Frontier Airlines for $265 million, and has agreed to buy the entire Pacific Division from Pan American World Airways for about $750 million.

"The primary purpose of United's move is to take these unused pension assets which have been recaptured and find an outlet promptly to generate a profit," said Robert Joedicke, an analyst with Shearson Lehman Brothers. "I think it is a smart move and a logical move. This is based on a certain synergism, since the same customers use the airlines and rent cars and stay in hotels. Most car rentals are made at the airports."

A United spokesman said the decision to recapture the nearly $1 billion from United's pension plan was not linked to the decision to buy Hertz. He said the company has been working on the Hertz acquisition for more than 9 months.

Hertz, founded in 1918 and purchased by RCA for $248.4 million in 1967, is the nation's largest car rental company, with a fleet of nearly 400,000 cars and trucks in more than 120 countries. Hertz generated about $1.44 billion in revenue and $50 million in pretax income last year, a RCA spokesman said.

The car rental business has become volatile recently as cut-rate companies have underpriced Hertz. Hertz has responded by offering promotional packages that include several extra days of rental without additional charges for customers who pay for four days' use.

United said the Hertz acquisition must still receive final approval from the RCA board of directors and is subject to execution of a definitive agreement between the companies. It also is subject to government approval.

RCA, which owns the NBC television network, has been the target of takeover rumors recently. The sale of Hertz strengthens the company's position in opposing an unwanted suitor by increasing the cash reserves it could use to fight a hostile takeover bid.