A teenager accused in the fatal shooting of a D.C. cabdriver has been charged in the slaying of a 40-year-old woman in Charles County who was gunned down for no apparent reason while she and her husband were walking their dog, authorities said. The woman’s husband was seriously wounded in the attack.

The suspect, Joshua T. Mebane, 17, of Waldorf, and a 17-year-old girl from Baltimore County were arrested Friday by D.C. police and charged with first-degree murder as adults in the slaying of the cabdriver in Northeast Washington earlier in the week.

On Monday, the Charles County sheriff’s office said it had obtained an arrest warrant charging Mebane with first-degree murder as an adult in the Oct. 26 shooting of Teresa Ann Bass on a footpath near Westlake High School in Waldorf.

Bass’s husband, 43, who has not been publicly identified, remains hospitalized, authorities said.

The sheriff’s office said Bass and her husband were walking their dog on a path between Hampshire Circle and the high school about 6:45 p.m. when they encountered the assailant.

“For unknown reasons, the male pulled a gun and fired shots,” the sheriff’s office said in a statement. “A motive is not clear.”

The Waldorf attack remained unsolved until after Mebane allegedly shot D.C. cabdriver Quadar Muhammad in the back of his head last week.

Mebane and his alleged accomplice in the D.C. killing, 17-year-old Linda Bury, had been together as boyfriend and girlfriend for about a week after meeting online, police said. The couple stayed at a D.C. motel until Wednesday night, when they hailed Muhammad’s cab and asked to be driven to a school on Brentwood Parkway NE, police said.

There, as Mebane sat with Bury in the back seat, he shot the driver in the head, according to a police affidavit filed in D.C. Superior Court. Muhammad was later found dead in his burning cab. Whether he was robbed remains unclear.

Bury was arrested after investigators received a tip that she had told two people that she and her boyfriend had killed a cabdriver in the District, according to the affidavit. The affidavit says that under questioning by D.C. homicide detectives, Bury provided details of Muhammad’s killing, which led to Mebane’s arrest.

After Mebane and Bury were charged Friday in the cabdriver’s slaying, Charles County investigators “received information that Mebane . . . was possibly connected” to the shootings of Bass and her husband in Waldorf, the sheriff’s statement said.

Diane Richardson, a spokeswoman for the sheriff’s office, said investigators soon gathered enough evidence to obtain a warrant to search the Waldorf house where Mebane had been staying. There, detectives found a semiautomatic handgun, Richardson said. She said ballistics tests linked it to the shootings of Bass and her husband.

Whether the handgun also was used in Muhammad’s killing is unclear. Mebane and Bury have been ordered jailed in the District without bond pending court proceedings in Muhammad’s slaying. Bury has not been charged in the Waldorf case.