RICHMOND, SEPT. 2 -- Virginia Gov. Gerald L. Baliles today dismissed as summer headline-hunting the proposal by Lt. Gov. L. Douglas Wilder to repeal the state's sales tax on nonprescription drugs.

"I have tried to bring a cautious, reflective, analytical approach {to the state budget} on the basis of priorities, and not on the basis of summer news releases," Baliles said.

Wilder, taping a public television show here this morning, quipped, "I'm trying to make some new friends for {the governor} -- taxpayers."

Told of that remark, Baliles fired back at his fellow Democrat and running mate, saying, "I've grown accustomed to his way of trying to help folks, and just appreciate all the help I can get."

In announcing a $154 million budget surplus last week, Baliles warned against a "stampede" to return the money to taxpayers or to spend it on pet projects. He said part of the surplus resulted from taxpayers taking advantage of expiring capital gains provisions in the federal tax code, a one-time occurrence that could result in decreased revenue in coming years.

Even before Baliles made his official announcement, Wilder was on the stump saying the state had a "moral" responsibility to return any surplus attributable to a windfall arising from the changes in the federal tax code. Then, Tuesday, Wilder announced he would lead a drive to get the legislature to repeal the 4.5 percent sales tax on nonprescription drugs, which would cost the state an estimated $30 million a year.

Baliles, who was attending the annual Southern Governors Conference in Louisville, initially did not respond to Wilder's proposal. Upon his return today, he spoke out.

Chris Bridge, the governor's press secretary, said it would be wrong to characterize Baliles' comments as angry or sarcastic. Responding to a reporter's suggestion, Bridge said, "I guess you could say he was puzzled, or concerned, or, yes, bemused."

Wilder insisted that he and Baliles "have a good relationship. I am not trying to be an apostate."

Although they ran as a Democratic team, the state's three top officeholders -- governor, lieutenant governor and attorney general -- are elected separately. Wilder has made it clear he feels free to speak and act independently of Baliles, and their other ticketmate, Attorney General Mary Sue Terry.

Wilder and Terry are considered the front-runners for the Democratic gubernatorial nomination in 1989. Baliles cannot succeed himself.

At his news conference yesterday, Wilder noted that as members of the General Assembly, Baliles voted in favor of proposals to remove the sales tax on nonprescription drugs, but Terry voted against their exemption.

Terry opted to stay out of the flap, saying the question of what to do about a budget surplus is "the responsibility of the governor and the legislature."

Last year, after Wilder announced his opposition to Baliles' sanctioning so-called contact visits for death row inmates, Baliles tweaked the lieutenant governor for failing to extend him the courtesy of advance notice of such public disagreements.

This time, although Wilder did not contact Baliles, his executive assistant, Joel W. Harris, notified Baliles' chief of staff Andrew B. Fogarty the night before Wilder's news conference.

Before leaving today on a privately sponsored three-week trip to the Soviet Union and Israel, Wilder said, "If I say absolutely nothing, people say I'm subdued . . . that I'm tailoring my style. If I say anything at all, I'm criticized for speaking out. The right to free speech is a cherished tradition."