Thanks to the sale of its $500 million hotel chain, Pan American World Airways reported a third-quarter gain in profits yesterday, but the company lost $80 million on airline operations.

The report "indicates Pan Am's problems are continuing and far from solved," said industry analyst Julius Maldutis Jr. of Salomon Brothers, an investment firm.

Pan Am, the most troubled of the airlines, reported a pretax loss on airline operations of $80.2 million for the three months ended Sept. 30 compared with pretax profits in the same period last year of $13 million.

Pan Am said its third-quarter net income was $281.5 million, up from $24.5 million in the quarter a year ago. But the profits included a $358.8 million pretax gain on Pan AM's $500 million sale of its luxury hotel chain, Intercontinental Hotel Corp., to Grand Metropolitan Ltd. of London on Sept. 10.

It said its consolidated operating revenues in the quarter, excluding the hotel unit's results, were $1.05 billion, down 1.9 percent from the year previous. Its operating expenses were up 6.7 percent to $1.1 billion.

Pan Am said its airline results reflected a 4 1/2 percent decline in scheduled passenger traffic, due in part to the strike by the air traffic controllers.

It said its fuel expense, representing 32 1/2 percent of all airline operating expenses, rose 3 1/2 percent despite a 6.4 percent decline in fuel consumption. The average price per gallon of jet fuel rose 10 1/2 percent in the quarter to $1.14.

Nine-month earnings were $63.9 million (90 cents a share) compared with a net loss a year ago of $116.7 million. Operating revenues for the nine months, excluding hotel operations, were up 1.8 percent to $2.88 billion.

The airline division reported a nine-month pretax loss of $320.3 million compared with a pretax loss of $142.6 million for the same period last year. Operating revenues were down 0.9 percent to $2.67 billion, while operating expenses were up 5 percent to $2.89 billion.

National Steel Corp. reported that earnings for the third quarter increased to $34.6 million ($1.85 a share) from a loss of $41.9 million in the third quarter of 1980.

Revenues for the quarter were $1.078 billion compared with $872.2 million in the same period last year, the firm said.

Net income for 1981 was reduced by $6.7 million (36 cents) for the write-off of equipment and engineering for discontinued projects at the Great Lakes Steel Divison, the firm said.

Included in the third-quarter earnings was net income of $14 million (75 cents) from the sale of land near Corpus Christi, Tex., and $3.5 million (19 cents) for a refund from the federal government in settlement of an environmental consent decree, the firm said.

Nine-month net income rose to $69.3 million ($3.70) from $68.4 million ($3.60), as revenues increased to $3.24 billion from $2.90 billion.