A Canonsburg man has been sentenced to 15 to 40 years in prison for killing a Pittsburgh man during a drug deal who had also shot and wounded him in Somerset.