Months into his captivity in Angola, Geoffrey Tyler wrote his worried mother in Prince George's County that he was coping fairly well with prison life but hoped it wouldn't be too long before he was free.

"As someone once said, when you get to the end of your rope, tie a knot in it and hang on -- I'm hanging on," Tyler, a 1967 graduate of DuVal High School, told her.

Yesterday, Marjorie Tyler was keeping in touch with the State Department and calculating the chances that her son, now 33, might be getting a proper homecoming in Seabrook, Md., by tonight after 21 months in prison. He was released today as part of a multinational prisoner exchange worked out by the Red Cross.

"He might be able to catch a plane out of Zambia and make a Paris connection that would get him into New York by 2 p.m.," said Mrs. Tyler, a widow, who plans to be on hand when her son and two captured American mercenaries return to the United States on a commercial airline. "Then, we'll catch the next shuttle here."

Tyler had been living in Lakeland, Fla., and working as a civilian pilot for Globe Aero Ltd. Inc., a firm that ferries small aircraft to purchasers abroad. He was on the way to Cape Town, South Africa, Feb. 4, 1981, when the single-engine Piper Cherokee Arrow he was flying experienced electrical problems, forcing Tyler to land on a road in Angola.

His mother received about 10 letters from her son while he was in prison, the last of which arrived in August. During his captivity she was able to send him packages -- via the Italian Embassy -- of vitamins, protein bars, clothing, a chess set and books. She also sent cigarettes to use in bartering for better provisions.

"Angola has a food shortage, and his diet was mostly rice," she said, adding that her son had written her that he was being generally well treated by his captors.

Tyler grew up in Prince George's County and graduated from The Citadel in South Carolina in 1971, then served as an Army medical officer in South Korea and Iran, resigning as a captain in 1978. After flight training, he joined Globe Aero in 1979. He is divorced.

Although there had been initial speculation that Tyler was an American spy, State Department officials said they had been told by the CIA that Tyler had no connection with that agency. Within a few months of his capture, his family had successfully pleaded Tyler's case to Sen. Paul Sarbanes (D-Md.), Rep. Steny Hoyer (D-Md.) and several other members of Congress, who demanded his release.

And Rep. Robert Dornan (R-Calif.), who heads the House Africa subcommittee, argued that Tyler "should have been released within 48 hours after he landed."

Marjorie Tyler, who works as a corporate secretary for Giant Food Inc. in Landover, yesterday praised the efforts of the State Department and congressional officials to win her son's release. She said they had kept in touch with her throughout her son's imprisonment and had often called her at home to see how she was holding up under the strain.