The West German opposition party's candidate for chancellor, Hans Jochen Vogel, met with Soviet leader Yuri Andropov here today and said later that Andropov's remarks have increased his optimism about a possible compromise at the Soviet-American talks in Geneva on reducing medium-range nuclear weapons.

Speaking to West German journalists, the Social Democratic Party's candidate said that Andropov had given him new details about the Dec. 21 Soviet proposal to reduce the number of Soviet medium-range missiles in Europe to match the combined total of 162 deployed by Britain and France.

The Soviet offer is contingent on NATO abandoning deployment in Western Europe of 572 cruise and Pershing II missiles, which is set to begin late this year.

"My hopes that there will be an agreement in Geneva have by no means been reduced by today's discussions, but have in fact been strengthened," Vogel said.

Vogel declined to provide details of his talks with Andropov, saying he intends to relay them first to the West German government of Chancellor Helmut Kohl.

Vogel conferred with Andropov for 2 1/2 hours, an unusually long period by Soviet standards.

For most of the time, the two men were accompanied by advisers except for about 15 minutes when Vogel and Andropov talked privately with only interpreters present.

During a visit to Washington last week, Vogel had described Soviet proposals as worth studying, but he also said that some points in them required elaboration. Vogel specifically questioned how many missiles the Soviets were planning to cut from their arsenal of medium-range weapons and whether this meant that they would be physically dismantled or merely moved to Siberia or the Far East.

In responding to Vogel's questions on this point, Andropov was said to have revealed some new elements.

The West German politician said he disagreed with Andropov when the latter voiced skepticism about U.S. intentions at the Geneva talks, which are due to resume later this month.

Vogel said he told Andropov that he thought President Reagan's "zero option," or the demand for the dismantling of all Soviet medium-range nuclear missiles in Europe in exchange for abandoning the planned deployment by NATO in December, was not Washington's final position in the negotiations.

Vogel's visits to the United States and the Soviet Union are seen here as an attempt to boost his political stature prior to the March 6 elections. Kohl's Christian Democrats have supported U.S. strategy at the Geneva talks, while Vogel's Social Democrats have been edging toward positions against the deployment of the new U.S. missiles.

There was speculation here that the Soviets may be trying to boost Vogel's image by revealing some significant modification in their position to him. Although Kohl is ahead of Vogel in public opinion polls, Vogel's fortunes could improve if he is able to present himself as capable of dealing with both Washington and Moscow.

By contrast, a delegation of 13 U.S. congressmen led by Rep. Thomas Lantos (D-Calif.) was not received by the new Soviet leader. The Americans instead met with Vadim Zagladin, a senior Central Committee official, the top officials of the two Soviet negotiating teams in Geneva and experts at the Institute for U.S.A. and Canada Studies.

A U.S. source said the Americans discussed arms control with the Soviets and also a number of human rights matters, including the case of jailed Jewish activist Anatoly Shcharansky.

The Geneva negotiators told the legislators that Moscow would consider destroying some of its medium-range missiles after reducing their number as part of an arms control settlement, Reuter reported. The offer, reported by delegation members, was the first time that the Soviets had mentioned the possibility of dismantling the weapons it would withdraw from Europe as opposed to relocating them in Asia or storing them, the news agency said.

Lantos last night visited Shcharansky's mother and brother, who told him that they had not been able to see the imprisoned activist last week. Sources said that prison authorities told Shcharansky's mother and brother that he was on a hunger strike and that as long as it continued he would not be able to receive visitors. The sources said that Shcharansky was fed intravenously and that he seemed in poor condition.

The Soviet news agency Tass, in a lengthy report on "frank and constructive" talks between Andropov and Vogel, praised the attitude of the West German Social Democrats and particularly of the party's disarmament expert, Egon Bahr, who accompanied Vogel. Tass said Bahr had adopted a "sober-minded" attitude by arguing that the nuclear deterrent forces of Britain and France should be taken into consideration at the Geneva talks.

Tass said that Andropov pointed out in the talks "the consequences, extremely dangerous to peace in Europe, which would follow the implementation of the U.S. and NATO plans to station in Western Europe, and primarily in West Germany, new American medium-range weapons."

The Associated Press added:

The Kremlin leadership said that if U.S.-Soviet relations are to improve, President Reagan must follow his own advice about matching words with deeds.

The statement was made in an editorial for the Communist Party newspaper Pravda's Wednesday edition, of which the official news agency Tass carried excerpts tonight.

The editorial recounted previous arguments that the United States is to blame for problems in Afghanistan, Poland and the Middle East, then noted that Reagan recently said that the Soviets must match moderate words with moderate behavior to improve ties with the United States. It called his sentiments "reasonable views" and said that if American policy were "based on such concepts, it would be possible to speak with confidence about positive prospects" for talks.