Abdulmalik Adua, 17, of Woolwich and Rezwan Islam, 19, of Gloucester, were both sentenced to a minimum of 16 years in prison.
Paul Pass, 49, was stabbed in his flat in Gloucester last October by the pair, who used it as a drug-dealing base.
Adua and Islam were found guilty of murder at an earlier hearing. Islam was also found guilty of kidnap.
Bristol Crown Court heard Mr Pass was hit over the head with a guitar and stabbed in the leg, which caused his death.
Bilal Ebrahim Moosajee, 19, of Gloucester was jailed for nine years after admitting manslaughter and kidnap at an earlier hearing.
He will serve half his sentence before being considered for release on parole.
The court was told the men were all part of a drug-dealing gang from outside the county who were trying to establish themselves in the city.
They offered Mr Pass free drugs in exchange for using his flat as a base.
The gang took revenge by attacking Mr Pass after his friends had broken into the flat and stolen their drugs.
Mr Pass's mother Josephine said: "I feel both angry towards the men who took Paul from me and great sadness for their mothers.
"They have not only taken Paul's life, they have taken mine away as well because I feel like I have died."
Two teenage drug dealers who murdered a man in a revenge attack have been jailed.