Robyn Oswald, arrested Thursday night after hijacking an airplane in an attempt to free prison inmate Garrett B. Trapnell, may have mistakenly believed that Trapnell was her father, sources close to her family say.

One family member said Trapnell, 40, who is serving a life sentence for air piracy, had suggested that the 17-year-old Oswald change her name to his. They said she had gotten to know Trapnell after her mother became friends with him while working on a graduate study project involving prisoners. Trapnell and the girl had later begun a correspondence, they said.

Another friend suggested that in the course of this correspondence she had come to substitute Trapnell for her father.

In a radio interview today, Trapnell theorized that the hijacking might have been caused by the cutting off of the correspondence by prison officials.

The sources said they and members of Oswald's family had been unable to persuade her the Trapnell was not her father. They identified her father as Robert S. Oswald. His whereabouts could not immediately be learned.

Oswald's mother, Barbara Ann Oswald, 43, was killed May 24 in an attempt to free Trapnell from the maximum security federal prison at Marion, Ill., using a hijacked helicopter. Barbara Ann Oswald and Robert S. Oswald are divorced.

As Robyn Oswald was being taken into custody at the Williamson County Illinois airport near Marion, Trapnell was convicted of four charges stemming from the May 24 escape attempt.

Witnesses at Trapnell's trial, in U.S. District Court in Benton, Ill., testified that Barbara Ann Oswald had planned to marry Trapnell had she succeeded in freeing him. Robyn Oswald, testified as a defense witness in Trapnell's trial.

Passengers said that while the hijacked airplane was on the ground in Marion, Robyn Oswald had demanded repeatedly that she be allowed to talk to Trapnell. Federal officials apparently denied those requests, telling her that Trapnell was in a courtroom and could not be reached by telephone. No one was injured during the 11-hour incident, although passengers aboard the aircraft said one young woman became hysterical after the plane was diverted. The woman was one of the first that Robyn Oswald allowed to leave the plane.

Most of the 83 passengers on the plane-Trans World Airlines flight 541 from Louisville, Ky., to Kansas City, with a stop in St. Louis-returned to St. Louis late Thursday night aboard the same DC9 jet in which they had been held captive. About 40 continued on to Kansas City, where they landed at about midnight, slightly more than 14 hours behind the flight's scheduled arrival.

Authorities said Robyn Oswald took command of the flight minutes after the plane left Lambert Field in St. Louis. She told flight attendants that she was armed with three sticks of dynamite. The FBI later determined that she had taped three railroad flares to her chest.

Until her mother was killed in May, Robyn Oswald had attended high school, in Clayton, Mo., an affluent suburb of St. lLouis. Some of her classmates described her as an average student with a quick temper who seemed to have many problems and appeared distressed of over her mother's death.

Last summer, she lived briefly with the family of a schoolmate. She told this family that she had gone with her mother to visit Trapnell in prison about a month before her mother was killed.

Trapnell was convicted of air piracy in 1972 after he hijacked at TWA jet with 94 passengers aboard and demanded $306,000.

Barbara Ann Oswald, who once told the St. Louis Globe-Democrat that she had been a prostitute, also came from a broken family. Her life improved, however, after the joined the military.

Upon leaving the army, Barbara Ann Oswald worked toward a master's degree in a human relations program designed for persons interested in the parole system. She wrote a paper on the Marion prison, read a book written by Trapnell and became friends with him.