Police say an officer from the Youth Violence Strike Force witnessed the whole thing - starting with the two running out of 29 Ridgewood toward the car and ending with them running away as he gave chase.
Police say he and other officers arrested the pair about a block away in the area of Westville Street and Geneva Avenue - where 12 hours later, another Youth Violence Strike Force officer exchanged gunfire with a man, leading to that man's death.
Police say the shooting victim got himself to Boston Medical Center and is expected to survive.
Tyshawn Cummings, 18, of Dorchester and Donnelle Joyner, 18, of Dorchester, were both charged with assault and battery with a dangerous weapon, unlawful possession of a firearm, unlawful possession of ammunition, carrying a loaded firearm and discharging a gun within 500 feet of a dwelling. They're expected to be arraigned in Dorchester District Court on Monday.