Yusef Mohamed, 22, (pictured right) from #Grangetown, was arrested by Cardiff Bay response officers in Butetown on April 30 in possession of Crack Cocaine and Heroin.
As a result of follow-up enquiries, Hamdi Sahal Roble, 34, (pictured left) from Butetown, was arrested by colleagues from the Organised Crime Team.
Mohamed was charged with possession with intent to supply heroin and crack cocaine and being concerned in the supply both these Class-A drugs.
Roble was also charged with being concerned in the supply of heroin and crack cocaine.
As part of the investigation, officers identified a vulnerable 36-year-old man believed to have been a victim of cuckooing.
He has since been safeguarded with the support of social services.
Cuckooing is when a drug dealer takes over the home of a vulnerable person who often lives on their own in order to use it as a base for drug dealing.
Mohamed, of Ferry Road, and Roble, of, Angelina Street, pleaded guilty on Thursday, November 5 and were sentenced at Cardiff Crown Court on Monday, February 1.
Mohamed was sentenced to 4 years and 6 months. Roble was sentenced to 5 years 4 months.