Prince George's County Executive Lawrence J. hogan needs B. W. (Mike) Donovan's help.

As long as Donovan, the state senator from District Heights opposes legislation eliminating restrictions on the county's borrowing power - legislation Hogan says he needs to pay for improvements to schools, roads and hospitals in the county - the measure seems doomed.

Donovan, for his part, wants a library built in his district. And, in the past few months, Hogan has not only canceled the architectural contract for the proposed library, he also took down the sign that said, "Future Site of Spaulding Library," which really made Donovan mad.

Now Donovan says he won't vote for the bond authorization bill unless he gets his library back. Hogan says Donovan can go whistle for his library. And both men have so far refused to budge.

This is not the first time Hogan's relationship with the Prince George's legislators has been strained. But hanging in the balance this time is an $8 million bond issue the county was hoping to float in June to pay for various construction projects, including improvements to several roads, renovation at several schools and construction of parking facilities.

The bill is needed because of the voters' approval last November of the TRIM charter amendment, which restricts the amount of taxes the county government may collect.

Another section of the county's charter requires that, in order to borrow money, the county government must have unlimited taxing authority to back its bonds, according to the county bond counsel.

The legislation sought by Hogan would eliminate this latter charter provision and allow the county to establish a new fund to back its debt obligations.

But Sen. Arthur Dorman, Sen. John J. Garrity and Sen. Peter A. Bozick, who joined Donovan in opposing the bill, all say it is designed to circumvent TRIM and would allow the county to spend unlimited amounts of tax dollars on capital projects.

Under TRIM, the county is prevented from collecting any more taxes than was needed to fund the fiscal 1979 budget.

Dorman and Garrity are quick to point out that Hogan promoted the TRIM amendment during his campaign and charge that he is now trying to get around it. "He was way out front, leading the pack, waving both hands . . . saying follow me and vote for TRIM. Now he's trying to circumvent it," said Garrity.

"I want Larry Hogan to say publicly that he made a mistake on TRIM, that there was no $40 million surplus and no slush fund," in the budget approved by Hogan's predecessor Winfield M. Kelly Jr., Bozick said angrily to Sen. Tommie Broadwater, one of the senators who is supporting the bill.

"Fairmont Heights, Fairmont Heights," Broadwater shouted back at Bozick, referring to a school that is scheduled for renovation in his district. Although Broadwater admits he isn't talking to Hogan because of a bitter argument they had last week, he is supporting this bill because he fears that renovation on schools and a road in his district would be threatened without it.

Since the votes of a mojority of senators from any county are essential to pass legislation that affects only that county, Hogan needed to persuade at least four other senators, besides Broadwater, to support the measure.

With Dorman, Donovan's vote became crucial. And before he would agree to help Hogan, Donovan wanted his library back.

"If he puts the sign (for the library) back and puts the money back (in the capital budget) for the architects, I imagine I'll vote for the bill," Donovan said today as he was being cornered in the Senate lounge by representatives from Hogan's office, the county council, the school board and the county attorney's office. All were asking him to change his mind.

Hogan, however, insisted he won't change his mind. "It's silly to spend money on (architectural design) when I see no likelihood that the library will be built," the county executive said today.

"And why put a sign up to give the people false hope that it will be built?"

Hogan said the county has already spent $27,000 on the architectural design, but that the total cost of the architect's contract would have been $183,000.

He said he decided to cut out funding in the capital budget for the Spaulding library and the Beltsville library because they would have cost about $250,000 each to operate each year.

Donovan said he asked Hogan about the library at the same meeting in which Hogan got into a shouting match with Broadwater. "I used a soft approach . . . I didn't shout or rave like some of the others . . . it seemed like a very little thing to ask him for," Donovan said.

Hogan did not help his case when he sent a letter to Bozick urging the senators to vote for the bond bill in which Bozick's name and that of Broadwater and Donovan were all misspelled. Garrity's name was not included.

Hogan said he was unaware of the misspellings when he signed the letter and called them "regrettable, inexcusable."

Bozick said late today that he may call for another vote on the measure, since Sen. Thomas P. O'Reilly was absent when the first vote was taken earlier this week. Even if O'Reilly votes, four opponents must give way for the bill to win ultimate approval in the legislature.