The 35-year-old Olney man charged in two recent slayings shot his first victim, his 81-year-old next-door neighbor, in the back of the head “execution-style” and had recently indicated that he was going to get money from the victim’s home, a prosecutor said in court Thursday.

The 81-year-old “always leaves his door open,” the suspect had told an acquaintance recently, “and I need some money,” according to the prosecutor, Peter Feeney.

Detectives say they still don’t know exactly what motivated the suspect. Rohan J. Goodlett, a college graduate and barber, has a history of mental illness and was under the supervision of state officials after previous run-ins with the law.

The agency that monitored his court-ordered outpatient program said Thursday that an early internal review of the case shows that its staff members acted properly but, citing confidentiality laws, the agency declined to offer details about Goodlett’s treatment.

“At this point, it appears that people were doing what they were supposed to be doing,” said Wendy Kronmiller, assistant secretary for regulatory affairs at the state’s Department of Health and Mental Hygiene.

But Kronmiller also said the agency, which has four licensed social workers monitoring the treatment of 822 people assigned to the agency’s Community Forensic Aftercare Program, would reevaluate its staffing levels in response to the charges against Goodlett. “We’re certainly going to look at that,” she said.

A woman who answered the phone at Goodlett’s court-designated psychiatrist’s office declined to comment.

Goodlett is charged with two counts of first-degree murder in the killings of Nazir Ahmed, 81, found slain in his home March 18, and Punyasara W. Palkumbure Gedara, 41, killed three days later as Gedara walked home from his job at a sandwich shop.

Goodlett made his first appearance in court Thursday. Shown via video camera feed from the county jail, he held his right hand over his heart for 30 seconds at the start of a bond hearing.

District Judge Barry Hamilton ordered him held without bond. Goodlett’s attorney, Mary Siegfried, told Hamilton that she may return to court for a change in his bond status. Siegfried declined further comment after the hearing.

Goodlett lived with his parents along Olney Mill Road. Neighbors have spoken warmly of the family, who were known to shovel their neighbors’ driveways after storms.

“They’re a very good, giving family,” neighbor Amy Wert said Thursday.

“Rohan was always very pleasant to us,” added Patricia Soper, a next-door neighbor. “He would say hello and wave back.”

But on Wednesday, Soper said, police knocked on her door and asked her to sit with Rohan’s mother until her husband came home. “They’re charging him with murder,” she told Soper, sobbing.

About 30 minutes later, Soper said, Rackham Goodlett returned home, put down his briefcase, walked into the living room, looked at his wife and patted her on the shoulder.

Friends of Ahmed recalled him as a warm, friendly retired civil engineer who mowed his own yard, regularly cleared it of sticks and took frequent walks.

“He didn’t believe in going to doctors or taking medicine,” said Mohamed Abdullahi, imam at the Muslim Community Center on New Hampshire Avenue in Silver Spring. “He just would drink water and smoke cigarettes.”

On most days, Ahmed arrived at the center at 5 p.m., walked several laps around the facility, and retired inside to read books and chat. He was last seen there March 16 and was discovered dead two days later in a second-floor bedroom by a friend from the center. Detectives are still trying to figure out when Ahmed was shot.

They have learned that he made an ATM withdrawal of about $40 on Thursday; that money was not found after police arrived, Feeney said in court.

On Sunday, two days after Ahmed’s body was found, Wert said she and another neighbor were talking outside when they saw Rohan Goodlett come out of his family’s house. Wert said hello, and Rohan Goodlett got in a car and left. The other neighbor called out to Goodlett to slow down as he backed out of the driveway.