AN IMPRESSION has spread that the West Germans were about to do a deal over Mohammed Ali Hamadei. He is the Lebanese, arrested in Frankfurt last`January with explosives and a false passport, who is accused of`hijacking a TWA`plane and murdering an American serviceman aboard it in 1985. Reports of a deal to spare him either serious`trial in Germany`or extradition to the United States started coming earlier this year from unidentified sources in Lebanon, where terrorists had picked up two West Germans as exchange bait. The man has been indicted in this country, and American officials are eager to bring him to justice here.

At the Venice summit, President Reagan got confirmation from West German Chancellor Helmut Kohl that no such deal was in the offing. The Germans, largely as a result of their long experience in human traffic with East-bloc communist governments, are most comfortable handling these matters discreetly; it was in the quiet that the Germans attempted to maintain around the Hamadei case that hints of a deal first broke through. In any event, at Venice Chancellor Kohl personally told an inquiring Ronald Reagan that his government would either extradite Mohammed Hamadei or try him for hijacking and murder. The Germans, who have a prisoner in their hands and two hostages on their minds, reserve to themselves the remaining, difficult tactical choices.

It is awkward that President Reagan, who is so intent on heading off any chance that a friendly government might consider swapping a terrorist suspect for German hostages, not so long ago undertook to swap arms for American hostages. Awkward as it is, however, Mr. Reagan's`current position beats surrendering to passivity and ineffectiveness in order to minimize a past embarrassment.

Democratic governments are bound to try to cope with the curse of terrorism by applying the law. This provides the`context in which`terrorists can try in response to play one victim country off another. That requires solidarity among the democracies. It means resistance to paying off the killers or kidnappers of another country's citizens in the hope of providing special protection to one's own.